Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac74c00e499ed276a965e5b5600667d5dc04a84a
Commit:     ac74c00e499ed276a965e5b5600667d5dc04a84a
Parent:     a4ffc0a0b240a29cbe489f6db9dae112a49ef1c1
Author:     Ulisses Furquim <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 04:18:16 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 09:22:22 2008 -0800

    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 <[EMAIL PROTECTED]>
    Reported-by: "Clem Taylor" <[EMAIL PROTECTED]>
    Tested-by: "Clem Taylor" <[EMAIL PROTECTED]>
    Cc: Amy Griffis <[EMAIL PROTECTED]>
    Cc: Robert Love <[EMAIL PROTECTED]>
    Cc: John McCutchan <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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 a336c97..3ab09a6 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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to