aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2025-11-09 13:52:54 +0100
committerChristian Brauner <brauner@kernel.org>2025-11-12 12:19:09 +0100
commite41c1f42919b01649ddea25b95eaa72dce2d591a (patch)
treedf7521aa16065f89db22adb87f6944d0dec352bd /fs/open.c
parent50b2a4f19b224694e2bc71a98a7a67aeebacc95e (diff)
downloadtip-e41c1f42919b01649ddea25b95eaa72dce2d591a.tar.gz
fs: touch predicts in do_dentry_open()
Helps out some of the asm, the routine is still a mess. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://patch.msgid.link/20251109125254.1288882-1-mjguzik@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/open.c b/fs/open.c
index 3d64372ecc675e..e3c737ede4e494 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -940,7 +940,7 @@ static int do_dentry_open(struct file *f,
}
error = security_file_open(f);
- if (error)
+ if (unlikely(error))
goto cleanup_all;
/*
@@ -950,11 +950,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 */