aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/fsnotify.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h
index ecb43b33d181..5c185fa27089 100644
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@ -235,10 +235,11 @@ static inline void fsnotify_open(struct file *file)
235 if (S_ISDIR(inode->i_mode)) 235 if (S_ISDIR(inode->i_mode))
236 mask |= FS_ISDIR; 236 mask |= FS_ISDIR;
237 237
238 if (!(file->f_mode & FMODE_NONOTIFY)) { 238 /* FMODE_NONOTIFY must never be set from user */
239 fsnotify_parent(path, NULL, mask); 239 file->f_mode &= ~FMODE_NONOTIFY;
240 fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); 240
241 } 241 fsnotify_parent(path, NULL, mask);
242 fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0);
242} 243}
243 244
244/* 245/*