Re: [PATCH 12/14] d_path: prepend_path(): lift the inner loop into a new helper

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

 



On Wed, May 19, 2021 at 12:48:59AM +0000, Al Viro wrote:
> ... and leave the rename_lock/mount_lock handling in prepend_path()
> itself

...

> +			if (!IS_ERR_OR_NULL(mnt_ns) && !is_anon_ns(mnt_ns))
> +				return 1;	// absolute root
> +			else
> +				return 2;	// detached or not attached yet

Would it be slightly better to read

			if (IS_ERR_OR_NULL(mnt_ns) || is_anon_ns(mnt_ns))
				return 2;	// detached or not attached yet
			else
				return 1;	// absolute root

?

Oh, I have noticed that it's in the original piece of code (perhaps separate
change if we ever need it?).


-- 
With Best Regards,
Andy Shevchenko





[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