diff options
author | Amir Goldstein <amir73il@gmail.com> | 2019-01-10 19:04:31 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-02-06 15:25:11 +0100 |
commit | a0a92d261f2922f4b5d2c0a98d6c41a89c7f5edd (patch) | |
tree | 958b51acde8238d308c2ca0986feeb95dc1fd864 /fs/notify/notification.c | |
parent | 45a9fb3725d8868a9b4192afd1a1f2bff1cc5ffb (diff) | |
download | lwn-a0a92d261f2922f4b5d2c0a98d6c41a89c7f5edd.tar.gz lwn-a0a92d261f2922f4b5d2c0a98d6c41a89c7f5edd.zip |
fsnotify: move mask out of struct fsnotify_event
Common fsnotify_event helpers have no need for the mask field.
It is only used by backend code, so move the field out of the
abstract fsnotify_event struct and into the concrete backend
event structs.
This change packs struct inotify_event_info better on 64bit
machine and will allow us to cram some more fields into
struct fanotify_event_info.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/notification.c')
-rw-r--r-- | fs/notify/notification.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 3c3e36745f59..027d5d5bb90e 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c @@ -71,7 +71,7 @@ void fsnotify_destroy_event(struct fsnotify_group *group, struct fsnotify_event *event) { /* Overflow events are per-group and we don't want to free them */ - if (!event || event->mask == FS_Q_OVERFLOW) + if (!event || event == group->overflow_event) return; /* * If the event is still queued, we have a problem... Do an unreliable @@ -194,23 +194,3 @@ void fsnotify_flush_notify(struct fsnotify_group *group) } spin_unlock(&group->notification_lock); } - -/* - * fsnotify_create_event - Allocate a new event which will be sent to each - * group's handle_event function if the group was interested in this - * particular event. - * - * @inode the inode which is supposed to receive the event (sometimes a - * parent of the inode to which the event happened. - * @mask what actually happened. - * @data pointer to the object which was actually affected - * @data_type flag indication if the data is a file, path, inode, nothing... - * @name the filename, if available - */ -void fsnotify_init_event(struct fsnotify_event *event, struct inode *inode, - u32 mask) -{ - INIT_LIST_HEAD(&event->list); - event->inode = inode; - event->mask = mask; -} |