diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2025-04-18 21:39:02 +0200 |
|---|---|---|
| committer | Jan Kara <jack@suse.cz> | 2025-04-24 10:58:59 +0200 |
| commit | c73c67026fe65d6677260dfd15dd968b709dc237 (patch) | |
| tree | e6558dcd31b380977c25e8633d45eda94cbc2828 /fs/notify | |
| parent | Linux 6.15-rc3 (diff) | |
| download | linux-c73c67026fe65d6677260dfd15dd968b709dc237.tar.gz linux-c73c67026fe65d6677260dfd15dd968b709dc237.zip | |
fanotify: fix flush of mntns marks
fanotify_mark(fd, FAN_MARK_FLUSH | FAN_MARK_MNTNS, ...) incorrectly
ends up causing removal inode marks.
Fixes: 0f46d81f2bce ("fanotify: notify on mount attach and detach")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250418193903.2607617-2-amir73il@gmail.com
Diffstat (limited to 'fs/notify')
| -rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index f2d840ae4ded..87f861e9004f 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -1961,12 +1961,7 @@ static int do_fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask, return -EINVAL; if (mark_cmd == FAN_MARK_FLUSH) { - if (mark_type == FAN_MARK_MOUNT) - fsnotify_clear_vfsmount_marks_by_group(group); - else if (mark_type == FAN_MARK_FILESYSTEM) - fsnotify_clear_sb_marks_by_group(group); - else - fsnotify_clear_inode_marks_by_group(group); + fsnotify_clear_marks_by_group(group, obj_type); return 0; } |
