diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-10-04 00:25:37 +0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-10-04 13:30:03 +0200 |
commit | bdd5a46fe30653cb4d26c7c787a22159bf79eed9 (patch) | |
tree | 4a6560e20f63bd8142925ccf5d9971e3f8374af0 /fs/notify/fanotify/fanotify.c | |
parent | a39f7ec41766118bf836d266224505741570ada6 (diff) | |
download | linux-bdd5a46fe30653cb4d26c7c787a22159bf79eed9.tar.bz2 |
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>
Diffstat (limited to 'fs/notify/fanotify/fanotify.c')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 03498eb995be..361e3a0a445c 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -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; |