fanotify: check FS_ISDIR flag instead of d_is_dir()
authorAmir Goldstein <amir73il@gmail.com>
Thu, 10 Jan 2019 17:04:41 +0000 (19:04 +0200)
committerJan Kara <jack@suse.cz>
Thu, 7 Feb 2019 15:38:36 +0000 (16:38 +0100)
commit0321e03cb4572fb3b56582bcb4927c1fe985b191
treed1b872b9b848f96c9bde1dd74b5f80a851c4b893
parent0a20df7ed3349dfa3260ddee2efa919df44d0ad5
fanotify: check FS_ISDIR flag instead of d_is_dir()

All fsnotify hooks set the FS_ISDIR flag for events that happen
on directory victim inodes except for fsnotify_perm().

Add the missing FS_ISDIR flag in fsnotify_perm() hook and let
fanotify_group_event_mask() check the FS_ISDIR flag instead of
checking if path argument is a directory.

This is needed for fanotify support for event types that do not
carry path information.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
include/linux/fsnotify.h