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...