fanotify: Pre-allocate pool of error events
authorGabriel Krisman Bertazi <krisman@collabora.com>
Mon, 25 Oct 2021 19:27:34 +0000 (16:27 -0300)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2021 10:35:05 +0000 (12:35 +0200)
commit734a1a5eccc5f7473002b0669f788e135f1f64aa
tree9a2bf10a36c11cd378181c3cefba5440391715a5
parent8d11a4f43ef4679be0908026907a7613b33d7127
fanotify: Pre-allocate pool of error events

Pre-allocate slots for file system errors to have greater chances of
succeeding, since error events can happen in GFP_NOFS context.  This
patch introduces a group-wide mempool of error events, shared by all
FAN_FS_ERROR marks in this group.

Link: https://lore.kernel.org/r/20211025192746.66445-20-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.c
fs/notify/fanotify/fanotify.h
fs/notify/fanotify/fanotify_user.c
include/linux/fsnotify_backend.h