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 Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux