aboutsummaryrefslogtreecommitdiff
path: root/fs/inotify_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inotify_user.c')
-rw-r--r--fs/inotify_user.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c
index dc7e1f61974..fe79c25d95d 100644
--- a/fs/inotify_user.c
+++ b/fs/inotify_user.c
@@ -574,6 +574,10 @@ asmlinkage long sys_inotify_init1(int flags)
struct file *filp;
int fd, ret;
+ /* Check the IN_* constants for consistency. */
+ BUILD_BUG_ON(IN_CLOEXEC != O_CLOEXEC);
+ BUILD_BUG_ON(IN_NONBLOCK != O_NONBLOCK);
+
if (flags & ~(IN_CLOEXEC | IN_NONBLOCK))
return -EINVAL;