Commit 2068cf7d authored by youngjun's avatar youngjun Committed by Miklos Szeredi
Browse files

ovl: remove unnecessary lock check



Directory is always locked until "out_unlock" label.  So lock check is not
needed.

Signed-off-by: default avataryoungjun <her0gyugyu@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 74c6e384
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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 @@ retry:
		goto out_err;
	}
out_unlock:
	if (locked)
	inode_unlock(dir);

	return work;

out_dput: