summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/inotify.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/inotify.c b/fs/inotify.c
index 7d57253..732ec4b 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -894,8 +894,7 @@ static int inotify_ignore(struct inotify_device *dev, s32 wd)
mutex_lock(&dev->mutex);
/* make sure that we did not race */
- watch = idr_find(&dev->idr, wd);
- if (likely(watch))
+ if (likely(idr_find(&dev->idr, wd) == watch))
remove_watch(watch, dev);
mutex_unlock(&dev->mutex);
OpenPOWER on IntegriCloud