From: Eric Paris Date: Wed, 28 Jul 2010 14:18:37 +0000 (-0400) Subject: inotify: send IN_UNMOUNT events X-Git-Tag: firefly_0821_release~10186^2~899 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e39ae50950e2cc9b92812f643d86f1a02cbab738;p=firefly-linux-kernel-4.4.55.git inotify: send IN_UNMOUNT events 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 Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 22ef16a478a0..aef8f5d7f94f 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -106,8 +106,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));