--- zzzz-none-000/linux-4.4.60/fs/notify/inotify/inotify_user.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-1750e-727/linux-4.4.60/fs/notify/inotify/inotify_user.c 2021-02-04 17:41:59.000000000 +0000 @@ -97,7 +97,7 @@ 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 | IN_EXCL_UNLINK)); + mask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK | IN_RECURSIVE)); return mask; } @@ -813,8 +813,13 @@ BUILD_BUG_ON(IN_EXCL_UNLINK != FS_EXCL_UNLINK); BUILD_BUG_ON(IN_ISDIR != FS_ISDIR); BUILD_BUG_ON(IN_ONESHOT != FS_IN_ONESHOT); + BUILD_BUG_ON(IN_RECURSIVE != FS_EVENT_ON_CHILD_RECURSIVLY); +#if defined(CONFIG_FSNOTIFY_RECURSIVE) + BUG_ON(hweight32(ALL_INOTIFY_BITS) != 22); +#else BUG_ON(hweight32(ALL_INOTIFY_BITS) != 21); +#endif inotify_inode_mark_cachep = KMEM_CACHE(inotify_inode_mark, SLAB_PANIC);