* [PATCH] fs: touch predicts in do_dentry_open()
@ 2025-11-09 12:52 Mateusz Guzik
2025-11-10 10:47 ` Jan Kara
2025-11-11 9:49 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Mateusz Guzik @ 2025-11-09 12:52 UTC (permalink / raw)
To: brauner; +Cc: viro, jack, linux-kernel, linux-fsdevel, Mateusz Guzik
Helps out some of the asm, the routine is still a mess.
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: touch predicts in do_dentry_open()
2025-11-09 12:52 [PATCH] fs: touch predicts in do_dentry_open() Mateusz Guzik
@ 2025-11-10 10:47 ` Jan Kara
2025-11-11 9:49 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2025-11-10 10:47 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: brauner, viro, jack, linux-kernel, linux-fsdevel
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@gmail.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.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@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: touch predicts in do_dentry_open()
2025-11-09 12:52 [PATCH] fs: touch predicts in do_dentry_open() Mateusz Guzik
2025-11-10 10:47 ` Jan Kara
@ 2025-11-11 9:49 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-11-11 9:49 UTC (permalink / raw)
To: Mateusz Guzik; +Cc: Christian Brauner, viro, jack, linux-kernel, linux-fsdevel
On Sun, 09 Nov 2025 13:52:54 +0100, Mateusz Guzik wrote:
> Helps out some of the asm, the routine is still a mess.
>
>
Applied to the vfs-6.19.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.19.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.19.misc
[1/1] fs: touch predicts in do_dentry_open()
https://git.kernel.org/vfs/vfs/c/3717e71df8ef
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-11 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-09 12:52 [PATCH] fs: touch predicts in do_dentry_open() Mateusz Guzik
2025-11-10 10:47 ` Jan Kara
2025-11-11 9:49 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®