diff options
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index c80f0e7e271..6093ec2d7a1 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -2494,11 +2494,14 @@ wb_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, entry->inode = NULL; memset (&entry->d_stat, 0, sizeof (entry->d_stat)); - - inode_unref (inode); } } UNLOCK (&wb_inode->lock); + + if (inode) { + inode_unref (inode); + inode = NULL; + } } unwind: |