diff --git a/[refs] b/[refs] index 9fa7ff086a0d..343859badc6e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 88d60c32765716289abeb362c44adf6c35c6824c +refs/heads/master: b1085ba80cd2784400a7beec3fda5099198ed01c diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 5362af9b7372..4ff7ca530533 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1748,6 +1748,9 @@ struct file *do_filp_open(int dfd, const char *pathname, if (!(open_flag & O_CREAT)) mode = 0; + /* Must never be set by userspace */ + open_flag &= ~FMODE_NONOTIFY; + /* * O_SYNC is implemented as __O_SYNC|O_DSYNC. As many places only * check for O_DSYNC if the need any syncing at all we enforce it's diff --git a/trunk/include/linux/fsnotify.h b/trunk/include/linux/fsnotify.h index 5c185fa27089..b10bcdeaef76 100644 --- a/trunk/include/linux/fsnotify.h +++ b/trunk/include/linux/fsnotify.h @@ -235,9 +235,6 @@ static inline void fsnotify_open(struct file *file) if (S_ISDIR(inode->i_mode)) mask |= FS_ISDIR; - /* FMODE_NONOTIFY must never be set from user */ - file->f_mode &= ~FMODE_NONOTIFY; - fsnotify_parent(path, NULL, mask); fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); }