diff options
author | Ulisses Furquim <ulissesf@gmail.com> | 2008-02-08 13:18:16 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 18:22:22 +0100 |
commit | ac74c00e499ed276a965e5b5600667d5dc04a84a (patch) | |
tree | 81a34f797445a15b322ab48f9f69c272ef1e242d /fs/inotify_user.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm (diff) | |
download | linux-ac74c00e499ed276a965e5b5600667d5dc04a84a.tar.xz linux-ac74c00e499ed276a965e5b5600667d5dc04a84a.zip |
inotify: fix check for one-shot watches before destroying them
As the IN_ONESHOT bit is never set when an event is sent we must check it
in the watch's mask and not in the event's mask.
Signed-off-by: Ulisses Furquim <ulissesf@gmail.com>
Reported-by: "Clem Taylor" <clem.taylor@gmail.com>
Tested-by: "Clem Taylor" <clem.taylor@gmail.com>
Cc: Amy Griffis <amy.griffis@hp.com>
Cc: Robert Love <rlove@google.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | fs/inotify_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/inotify_user.c b/fs/inotify_user.c index a336c9709f3c..3ab09a65c456 100644 --- a/fs/inotify_user.c +++ b/fs/inotify_user.c @@ -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 */ |