]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: Fold event size calculation to its own function
authorGabriel Krisman Bertazi <krisman@collabora.com>
Mon, 25 Oct 2021 19:27:20 +0000 (16:27 -0300)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2021 10:33:14 +0000 (12:33 +0200)
commit4372c46ccbcb81919ec776bea0ea7951b922c6a7
tree55a61f01f5ae72db67bd5f5afa06273ab0d8a7e5
parentd23ee657fbde452f7053ad4bb3c0d141f19a5201
fanotify: Fold event size calculation to its own function

Every time this function is invoked, it is immediately added to
FAN_EVENT_METADATA_LEN, since there is no need to just calculate the
length of info records. This minor clean up folds the rest of the
calculation into the function, which now operates in terms of events,
returning the size of the entire event, including metadata.

Link: https://lore.kernel.org/r/20211025192746.66445-6-krisman@collabora.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>
fs/notify/fanotify/fanotify_user.c