[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c9e5914-8dee-4929-b574-f59f50305f4a@yandex.ru>
Date: Wed, 24 Apr 2024 13:58:38 +0300
From: stsp <stsp2@...dex.ru>
To: David Laight <David.Laight@...LAB.COM>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: Eric Biederman <ebiederm@...ssion.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Andy Lutomirski <luto@...nel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 1/2] fs: reorganize path_openat()
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.
Powered by blists - more mailing lists