[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <jxuw4d73w4gjnuzykcanbawpjyw5bw5jq6pq2bo3fsyykhdeob@wp2536gkor5m>
Date: Mon, 10 Nov 2025 11:47:34 +0100
From: Jan Kara <jack@...e.cz>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: brauner@...nel.org, viro@...iv.linux.org.uk, jack@...e.cz,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fs: touch predicts in do_dentry_open()
On Sun 09-11-25 13:52:54, Mateusz Guzik wrote:
> Helps out some of the asm, the routine is still a mess.
>
> Signed-off-by: Mateusz Guzik <mjguzik@...il.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> fs/open.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/open.c b/fs/open.c
> index 1d73a17192da..2a2cf9007900 100644
> --- a/fs/open.c
> +++ b/fs/open.c
> @@ -937,7 +937,7 @@ static int do_dentry_open(struct file *f,
> }
>
> error = security_file_open(f);
> - if (error)
> + if (unlikely(error))
> goto cleanup_all;
>
> /*
> @@ -947,11 +947,11 @@ static int do_dentry_open(struct file *f,
> * pseudo file, this call will not change the mode.
> */
> error = fsnotify_open_perm_and_set_mode(f);
> - if (error)
> + if (unlikely(error))
> goto cleanup_all;
>
> error = break_lease(file_inode(f), f->f_flags);
> - if (error)
> + if (unlikely(error))
> goto cleanup_all;
>
> /* normally all 3 are set; ->open() can clear them if needed */
> --
> 2.48.1
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists