diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2021-10-25 16:27:24 -0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-10-27 12:33:43 +0200 |
commit | 1ad03c3a326a86e259389592117252c851873395 (patch) | |
tree | c6103c4e6fe7bfbb6471e75ea61dbf756773da0e /fs/notify/notification.c | |
parent | 808967a0a4d2f4ce6a2005c5692fffbecaf018c1 (diff) | |
download | lwn-1ad03c3a326a86e259389592117252c851873395.tar.gz lwn-1ad03c3a326a86e259389592117252c851873395.zip |
fsnotify: Add wrapper around fsnotify_add_event
fsnotify_add_event is growing in number of parameters, which in most
case are just passed a NULL pointer. So, split out a new
fsnotify_insert_event function to clean things up for users who don't
need an insert hook.
Link: https://lore.kernel.org/r/20211025192746.66445-10-krisman@collabora.com
Suggested-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/notification.c')
-rw-r--r-- | fs/notify/notification.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 32f45543b9c6..44bb10f50715 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c @@ -78,12 +78,12 @@ void fsnotify_destroy_event(struct fsnotify_group *group, * 2 if the event was not queued - either the queue of events has overflown * or the group is shutting down. */ -int fsnotify_add_event(struct fsnotify_group *group, - struct fsnotify_event *event, - int (*merge)(struct fsnotify_group *, - struct fsnotify_event *), - void (*insert)(struct fsnotify_group *, - struct fsnotify_event *)) +int fsnotify_insert_event(struct fsnotify_group *group, + struct fsnotify_event *event, + int (*merge)(struct fsnotify_group *, + struct fsnotify_event *), + void (*insert)(struct fsnotify_group *, + struct fsnotify_event *)) { int ret = 0; struct list_head *list = &group->notification_list; |