Re: [PATCH 02/14] namei: clean up do_rmdir retry logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux