]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
fanotify: create overflow event type
authorAmir Goldstein <amir73il@gmail.com>
Wed, 8 Jul 2020 11:11:42 +0000 (14:11 +0300)
committerJan Kara <jack@suse.cz>
Wed, 15 Jul 2020 15:37:03 +0000 (17:37 +0200)
commitb8a6c3a2f0ae4d82732810e55ca8aa455e040bbf
tree1ff4d371101455f107cf5ca611e01dd1a910e07b
parent956235afd145e60094642fca83486c0f3ccaca16
fanotify: create overflow event type

The special overflow event is allocated as struct fanotify_path_event,
but with a null path.

Use a special event type to identify the overflow event, so the helper
fanotify_has_event_path() will always indicate a non null path.

Allocating the overflow event doesn't need any of the fancy stuff in
fanotify_alloc_event(), so create a simplified helper for allocating the
overflow event.

There is also no need to store and report the pid with an overflow event.

Link: https://lore.kernel.org/r/20200708111156.24659-7-amir73il@gmail.com
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify.h
fs/notify/fanotify/fanotify_user.c