diff options
Diffstat (limited to 'xlators/features/locks/src/inodelk.c')
-rw-r--r-- | xlators/features/locks/src/inodelk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index a8381adda3d..64ffb00c18c 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -720,9 +720,6 @@ out: if (ctx) pthread_mutex_unlock (&ctx->lock); - if (need_inode_unref) - inode_unref (pl_inode->inode); - /* The following (extra) unref corresponds to the ref that * was done at the time the lock was granted. */ @@ -731,6 +728,10 @@ out: grant_blocked_inode_locks (this, pl_inode, dom); } + if (need_inode_unref) { + inode_unref (pl_inode->inode); + } + return ret; } |