提交 2068cf7d 编写于 作者: Y youngjun 提交者: Miklos Szeredi

ovl: remove unnecessary lock check

Directory is always locked until "out_unlock" label.  So lock check is not
needed.
Signed-off-by: Nyoungjun <her0gyugyu@gmail.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 74c6e384
......@@ -676,11 +676,8 @@ static struct dentry *ovl_workdir_create(struct ovl_fs *ofs,
struct dentry *work;
int err;
bool retried = false;
bool locked = false;
inode_lock_nested(dir, I_MUTEX_PARENT);
locked = true;
retry:
work = lookup_one_len(name, ofs->workbasedir, strlen(name));
......@@ -741,9 +738,7 @@ static struct dentry *ovl_workdir_create(struct ovl_fs *ofs,
goto out_err;
}
out_unlock:
if (locked)
inode_unlock(dir);
inode_unlock(dir);
return work;
out_dput:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册