fanotify: add BUILD_BUG_ON() to count the bits of fanotify constants
Also define the FANOTIFY_EVENT_FLAGS consisting of the extra flags FAN_ONDIR and FAN_ON_CHILD. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
@@ -205,6 +205,8 @@ static int fanotify_handle_event(struct fsnotify_group *group,
|
||||
BUILD_BUG_ON(FAN_ACCESS_PERM != FS_ACCESS_PERM);
|
||||
BUILD_BUG_ON(FAN_ONDIR != FS_ISDIR);
|
||||
|
||||
BUILD_BUG_ON(HWEIGHT32(ALL_FANOTIFY_EVENT_BITS) != 10);
|
||||
|
||||
if (!fanotify_should_send_event(iter_info, mask, data, data_type))
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user