diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2021-10-25 16:27:34 -0300 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2021-10-27 12:35:05 +0200 |
commit | 734a1a5eccc5f7473002b0669f788e135f1f64aa (patch) | |
tree | 9a2bf10a36c11cd378181c3cefba5440391715a5 /include/linux/fsnotify_backend.h | |
parent | 8d11a4f43ef4679be0908026907a7613b33d7127 (diff) | |
download | linux-734a1a5eccc5f7473002b0669f788e135f1f64aa.tar.gz linux-734a1a5eccc5f7473002b0669f788e135f1f64aa.tar.bz2 linux-734a1a5eccc5f7473002b0669f788e135f1f64aa.zip |
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>
Diffstat (limited to 'include/linux/fsnotify_backend.h')
-rw-r--r-- | include/linux/fsnotify_backend.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 00dbaafbcf95..51ef2b079bfa 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -19,6 +19,7 @@ #include <linux/atomic.h> #include <linux/user_namespace.h> #include <linux/refcount.h> +#include <linux/mempool.h> /* * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily @@ -246,6 +247,7 @@ struct fsnotify_group { int flags; /* flags from fanotify_init() */ int f_flags; /* event_f_flags from fanotify_init() */ struct ucounts *ucounts; + mempool_t error_events_pool; } fanotify_data; #endif /* CONFIG_FANOTIFY */ }; |