Re: [PATCH 02/14] namei: clean up do_rmdir retry logic
From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-07-15 20:03:01
Also in:
linux-fsdevel
From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-07-15 20:03:01
Also in:
linux-fsdevel
On Thu, Jul 15, 2021 at 05:35:48PM +0700, Dmitry Kadashev wrote:
No functional changes, just move the main logic to a helper function to make the whole thing easier to follow.
If you are renaming that pile of labels, at least give them names that would
mean something... And TBH I would probably go for something like
dentry = __lookup_hash(&last, path.dentry, lookup_flags);
if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
goto out_unlock;
}
if (!dentry->d_inode)
error = -ENOENT;
if (!error)
error = security_path_rmdir(&path, dentry);
if (!error)
error = vfs_rmdir(mnt_user_ns(path.mnt),
path.dentry->d_inode, dentry);
dput(dentry);
out_unlock:
there, to simplify that pile a bit...