]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/inotify_user.c
inotify: fix check for one-shot watches before destroying them
[linux-2.6-omap-h63xx.git] / fs / inotify_user.c
index a336c9709f3cc477ed15236642b743f0a3ca493e..3ab09a65c456499d0b51604ab84f364c42f4eed5 100644 (file)
@@ -283,7 +283,7 @@ static void inotify_dev_queue_event(struct inotify_watch *w, u32 wd, u32 mask,
        /* we can safely put the watch as we don't reference it while
         * generating the event
         */
-       if (mask & IN_IGNORED || mask & IN_ONESHOT)
+       if (mask & IN_IGNORED || w->mask & IN_ONESHOT)
                put_inotify_watch(w); /* final put */
 
        /* coalescing: drop this event if it is a dupe of the previous */