Re: [PATCH 1/2] fs: reorganize path_openat()

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

 



24.04.2024 12:17, David Laight пишет:
You probably ought to merge the two 'unlikely' tests.
Otherwise there'll be two conditionals in the 'hot path'.
(There probably always were.)
So something like:
	if (unlikely(op->open_flag & (__O_TMPFILE | O_PATH))) {
		file = alloc_empty_file(op->open_flag, current_cred());
		if (IS_ERR(file))
			return file;
		if (op->open_flag & __O_TMFILE)
			error = do_tmpfile(nd, flags, op, file);
		else
			error = do_o_path(nd, flags, file);
	} else {

Posted v4 with this code verbatim.

Copying op->open_flag to a local may also generate better code.
Done this as well.

Thank you.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux