Commit e8b23722 authored by Lai Siyao's avatar Lai Siyao Committed by Greg Kroah-Hartman

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: default avatarLai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7232
Reviewed-on: http://review.whamcloud.com/16841Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c7298013
...@@ -1475,6 +1475,7 @@ static int revalidate_statahead_dentry(struct inode *dir, ...@@ -1475,6 +1475,7 @@ static int revalidate_statahead_dentry(struct inode *dir,
alias = ll_splice_alias(inode, *dentryp); alias = ll_splice_alias(inode, *dentryp);
if (IS_ERR(alias)) { if (IS_ERR(alias)) {
ll_intent_release(&it);
rc = PTR_ERR(alias); rc = PTR_ERR(alias);
goto out_unplug; goto out_unplug;
} }
...@@ -1493,6 +1494,7 @@ static int revalidate_statahead_dentry(struct inode *dir, ...@@ -1493,6 +1494,7 @@ static int revalidate_statahead_dentry(struct inode *dir,
*dentryp, *dentryp,
PFID(ll_inode2fid((*dentryp)->d_inode)), PFID(ll_inode2fid((*dentryp)->d_inode)),
PFID(ll_inode2fid(inode))); PFID(ll_inode2fid(inode)));
ll_intent_release(&it);
rc = -ESTALE; rc = -ESTALE;
goto out_unplug; goto out_unplug;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment