diff options
Diffstat (limited to 'fs/inotify_user.c')
-rw-r--r-- | fs/inotify_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c index 851005998cd4..dc7e1f619748 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c | |||
@@ -574,7 +574,7 @@ asmlinkage long sys_inotify_init1(int flags) | |||
574 | struct file *filp; | 574 | struct file *filp; |
575 | int fd, ret; | 575 | int fd, ret; |
576 | 576 | ||
577 | if (flags & ~IN_CLOEXEC) | 577 | if (flags & ~(IN_CLOEXEC | IN_NONBLOCK)) |
578 | return -EINVAL; | 578 | return -EINVAL; |
579 | 579 | ||
580 | fd = get_unused_fd_flags(flags & O_CLOEXEC); | 580 | fd = get_unused_fd_flags(flags & O_CLOEXEC); |
@@ -613,7 +613,7 @@ asmlinkage long sys_inotify_init1(int flags) | |||
613 | filp->f_path.dentry = dget(inotify_mnt->mnt_root); | 613 | filp->f_path.dentry = dget(inotify_mnt->mnt_root); |
614 | filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping; | 614 | filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping; |
615 | filp->f_mode = FMODE_READ; | 615 | filp->f_mode = FMODE_READ; |
616 | filp->f_flags = O_RDONLY; | 616 | filp->f_flags = O_RDONLY | (flags & O_NONBLOCK); |
617 | filp->private_data = dev; | 617 | filp->private_data = dev; |
618 | 618 | ||
619 | INIT_LIST_HEAD(&dev->events); | 619 | INIT_LIST_HEAD(&dev->events); |