Skip to content

Commit f179369

Browse files
amir73iljankara
authored andcommitted
fanotify: turn off support for FAN_DIR_MODIFY
FAN_DIR_MODIFY has been enabled by commit 44d705b ("fanotify: report name info for FAN_DIR_MODIFY event") in 5.7-rc1. Now we are planning further extensions to the fanotify API and during that we realized that FAN_DIR_MODIFY may behave slightly differently to be more consistent with extensions we plan. So until we finalize these extensions, let's not bind our hands with exposing FAN_DIR_MODIFY to userland. Signed-off-by: Amir Goldstein <[email protected]> Signed-off-by: Jan Kara <[email protected]>
1 parent 444fc5c commit f179369

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

fs/notify/fanotify/fanotify.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ static int fanotify_handle_event(struct fsnotify_group *group,
520520
BUILD_BUG_ON(FAN_OPEN_EXEC != FS_OPEN_EXEC);
521521
BUILD_BUG_ON(FAN_OPEN_EXEC_PERM != FS_OPEN_EXEC_PERM);
522522

523-
BUILD_BUG_ON(HWEIGHT32(ALL_FANOTIFY_EVENT_BITS) != 20);
523+
BUILD_BUG_ON(HWEIGHT32(ALL_FANOTIFY_EVENT_BITS) != 19);
524524

525525
mask = fanotify_group_event_mask(group, iter_info, mask, data,
526526
data_type);

include/linux/fanotify.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
* Directory entry modification events - reported only to directory
4848
* where entry is modified and not to a watching parent.
4949
*/
50-
#define FANOTIFY_DIRENT_EVENTS (FAN_MOVE | FAN_CREATE | FAN_DELETE | \
51-
FAN_DIR_MODIFY)
50+
#define FANOTIFY_DIRENT_EVENTS (FAN_MOVE | FAN_CREATE | FAN_DELETE)
5251

5352
/* Events that can only be reported with data type FSNOTIFY_EVENT_INODE */
5453
#define FANOTIFY_INODE_EVENTS (FANOTIFY_DIRENT_EVENTS | \

0 commit comments

Comments
 (0)