]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
inotify: send IN_UNMOUNT events
authorEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 14:18:37 +0000 (10:18 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Sep 2010 00:18:31 +0000 (17:18 -0700)
commit 611da04f7a31b2208e838be55a42c7a1310ae321 upstream.

Since the .31 or so notify rewrite inotify has not sent events about
inodes which are unmounted.  This patch restores those events.

Signed-off-by: Eric Paris <eparis@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/notify/inotify/inotify_user.c

index e46ca685b9be39fc5f1f59ae5d6c6309d60aa644..0c6bbc031f15a2677be351ef4a9fa4eab3edfbf8 100644 (file)
@@ -96,8 +96,11 @@ static inline __u32 inotify_arg_to_mask(u32 arg)
 {
        __u32 mask;
 
-       /* everything should accept their own ignored and cares about children */
-       mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD);
+       /*
+        * everything should accept their own ignored, cares about children,
+        * and should receive events when the inode is unmounted
+        */
+       mask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD | FS_UNMOUNT);
 
        /* mask off the flags used to open the fd */
        mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT));