summaryrefslogtreecommitdiffstats
path: root/fs/notify/inotify/inotify_user.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-02-04 08:45:42 +0100
committerIngo Molnar <mingo@kernel.org>2019-02-04 08:45:42 +0100
commit98cb621081705e2244ef6c265ff8a9f2208c7e2a (patch)
tree6205be47a83d54d3e35e049b67973244120f8bd6 /fs/notify/inotify/inotify_user.c
parentb844ff366f06a2bcecfbd053b4d4a472e670dec8 (diff)
parent9dff0aa95a324e262ffb03f425d00e4751f3294e (diff)
downloadlinux-98cb621081705e2244ef6c265ff8a9f2208c7e2a.tar.gz
linux-98cb621081705e2244ef6c265ff8a9f2208c7e2a.tar.bz2
linux-98cb621081705e2244ef6c265ff8a9f2208c7e2a.zip
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/notify/inotify/inotify_user.c')
-rw-r--r--fs/notify/inotify/inotify_user.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 105576daca4a..798f1253141a 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -724,8 +724,10 @@ SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname,
return -EBADF;
/* IN_MASK_ADD and IN_MASK_CREATE don't make sense together */
- if (unlikely((mask & IN_MASK_ADD) && (mask & IN_MASK_CREATE)))
- return -EINVAL;
+ if (unlikely((mask & IN_MASK_ADD) && (mask & IN_MASK_CREATE))) {
+ ret = -EINVAL;
+ goto fput_and_out;
+ }
/* verify that this is indeed an inotify instance */
if (unlikely(f.file->f_op != &inotify_fops)) {