diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-04-20 16:10:52 -0700 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-05-18 14:58:22 +0200 |
commit | 47d9c7cc457adc5d6d8ca966482a51459f81e852 (patch) | |
tree | 5022fd69ab92a6f522b55ddb69b9ea2b22d84590 /fs/notify/inotify | |
parent | d9a6f30bb89309a7f2473028a00b83b020049cb4 (diff) |
fsnotify: generalize iteration of marks by object type
Make some code that handles marks of object types inode and vfsmount
generic, so it can handle other object types.
Introduce fsnotify_foreach_obj_type macro to iterate marks by object type
and fsnotify_iter_{should|set}_report_type macros to set/test report_mask.
This is going to be used for adding mark of another object type
(super block mark).
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/inotify')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 22a3d0471fee..6a408ab3169d 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -485,10 +485,10 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark, struct fsnotify_group *group) { struct inotify_inode_mark *i_mark; - struct fsnotify_iter_info iter_info = { - .inode_mark = fsn_mark, - .report_mask = FSNOTIFY_OBJ_TYPE_INODE_FL, - }; + struct fsnotify_iter_info iter_info = { }; + + fsnotify_iter_set_report_type_mark(&iter_info, FSNOTIFY_OBJ_TYPE_INODE, + fsn_mark); /* Queue ignore event for the watch */ inotify_handle_event(group, NULL, FS_IN_IGNORED, NULL, |