staging: lustre: statahead: lock leaks if statahead file recreated

During statahead file may be recreated, though this is rare case,
current code will leak the lock, this patch will release lock in
this case.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7232
Reviewed-on: http://review.whamcloud.com/16841
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Lai Siyao 2016-11-10 12:30:51 -05:00 committed by Greg Kroah-Hartman
parent c7298013ce
commit e8b237227b
1 changed files with 2 additions and 0 deletions

View File

@ -1475,6 +1475,7 @@ static int revalidate_statahead_dentry(struct inode *dir,
alias = ll_splice_alias(inode, *dentryp);
if (IS_ERR(alias)) {
ll_intent_release(&it);
rc = PTR_ERR(alias);
goto out_unplug;
}
@ -1493,6 +1494,7 @@ static int revalidate_statahead_dentry(struct inode *dir,
*dentryp,
PFID(ll_inode2fid((*dentryp)->d_inode)),
PFID(ll_inode2fid(inode)));
ll_intent_release(&it);
rc = -ESTALE;
goto out_unplug;
}