mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ovl: remove unnecessary lock check
Directory is always locked until "out_unlock" label. So lock check is not needed. Signed-off-by: youngjun <her0gyugyu@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
74c6e384e9
commit
2068cf7dfb
1 changed files with 1 additions and 6 deletions
|
@ -676,11 +676,8 @@ static struct dentry *ovl_workdir_create(struct ovl_fs *ofs,
|
||||||
struct dentry *work;
|
struct dentry *work;
|
||||||
int err;
|
int err;
|
||||||
bool retried = false;
|
bool retried = false;
|
||||||
bool locked = false;
|
|
||||||
|
|
||||||
inode_lock_nested(dir, I_MUTEX_PARENT);
|
inode_lock_nested(dir, I_MUTEX_PARENT);
|
||||||
locked = true;
|
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
work = lookup_one_len(name, ofs->workbasedir, strlen(name));
|
work = lookup_one_len(name, ofs->workbasedir, strlen(name));
|
||||||
|
|
||||||
|
@ -741,9 +738,7 @@ retry:
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
out_unlock:
|
out_unlock:
|
||||||
if (locked)
|
inode_unlock(dir);
|
||||||
inode_unlock(dir);
|
|
||||||
|
|
||||||
return work;
|
return work;
|
||||||
|
|
||||||
out_dput:
|
out_dput:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue