diff options
author | Jani Nikula <jani.nikula@intel.com> | 2025-02-28 11:25:36 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2025-02-28 11:25:36 +0200 |
commit | 8918e180a6fd67fc9864f2ba18186b4573f8a61b (patch) | |
tree | 76a85b3cf4c35818c3b622b65da7ae3dae5ff6ac /fs/open.c | |
parent | 67093883808b5b39894d8859937be4468eca50db (diff) | |
parent | 33e26f3544a558e7476eb221ff33173759b3a116 (diff) |
Merge drm/drm-next into drm-intel-next
Sync to fix conlicts between drm-xe-next and drm-intel-next.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/open.c b/fs/open.c index 932e5a6de63b..1be20de9f283 100644 --- a/fs/open.c +++ b/fs/open.c @@ -905,7 +905,8 @@ static int do_dentry_open(struct file *f, f->f_sb_err = file_sample_sb_err(f); if (unlikely(f->f_flags & O_PATH)) { - f->f_mode = FMODE_PATH | FMODE_OPENED | FMODE_NONOTIFY; + f->f_mode = FMODE_PATH | FMODE_OPENED; + file_set_fsnotify_mode(f, FMODE_NONOTIFY); f->f_op = &empty_fops; return 0; } @@ -935,10 +936,10 @@ static int do_dentry_open(struct file *f, /* * Set FMODE_NONOTIFY_* bits according to existing permission watches. - * If FMODE_NONOTIFY was already set for an fanotify fd, this doesn't - * change anything. + * If FMODE_NONOTIFY mode was already set for an fanotify fd or for a + * pseudo file, this call will not change the mode. */ - file_set_fsnotify_mode(f); + file_set_fsnotify_mode_from_watchers(f); error = fsnotify_open_perm(f); if (error) goto cleanup_all; @@ -1122,7 +1123,7 @@ struct file *dentry_open_nonotify(const struct path *path, int flags, if (!IS_ERR(f)) { int error; - f->f_mode |= FMODE_NONOTIFY; + file_set_fsnotify_mode(f, FMODE_NONOTIFY); error = vfs_open(path, f); if (error) { fput(f); |