OSDN Git Service

inotify: send IN_UNMOUNT events
[android-x86/kernel.git] / fs / notify / inotify / inotify_user.c
index e46ca68..0c6bbc0 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));