summaryrefslogtreecommitdiff
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2025-07-08 16:36:40 +0200
committerJan Kara <jack@suse.cz>2025-07-28 18:14:38 +0200
commit08da98e1b2f76cdbacf84b9affaa75960dbce515 (patch)
treedf25e6a4bfa465c8a16f589452611e33d330a52f /fs/file_table.c
parent3193e8942fc7f70ba3c872a988a0c15f98818bd2 (diff)
fsnotify: merge file_set_fsnotify_mode_from_watchers() with open perm hook
Create helper fsnotify_open_perm_and_set_mode() that moves the fsnotify_open_perm() hook into file_set_fsnotify_mode_from_watchers(). This will allow some more optimizations. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20250708143641.418603-2-amir73il@gmail.com
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 138114d64307..14ee3581c768 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -196,7 +196,7 @@ static int init_file(struct file *f, int flags, const struct cred *cred)
file_ref_init(&f->f_ref, 1);
/*
* Disable permission and pre-content events for all files by default.
- * They may be enabled later by file_set_fsnotify_mode_from_watchers().
+ * They may be enabled later by fsnotify_open_perm_and_set_mode().
*/
file_set_fsnotify_mode(f, FMODE_NONOTIFY_PERM);
return 0;