diff options
| author | Christian Brauner <brauner@kernel.org> | 2024-08-28 13:56:25 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2024-08-29 16:20:33 +0300 |
| commit | ea566e18b4deea6e998088de4f1a76d1f39c8d3f (patch) | |
| tree | 303fc2b39b85f01582497fcb2f8a2c38bb24063b /include/linux | |
| parent | d345bd2e9834e2da505977e154a1c179c793b7b2 (diff) | |
| download | linux-ea566e18b4deea6e998088de4f1a76d1f39c8d3f.tar.xz | |
fs: use kmem_cache_create_rcu()
Switch to the new kmem_cache_create_rcu() helper which allows us to use
a custom free pointer offset avoiding the need to have an external free
pointer which would grow struct file behind our backs.
Link: https://lore.kernel.org/r/20240828-work-kmem_cache-rcu-v3-3-5460bc1f09f6@kernel.org
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index af8bbd4eeb3a..58c91a52cad1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1011,6 +1011,7 @@ static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index) * @f_task_work: task work entry point * @f_llist: work queue entrypoint * @f_ra: file's readahead state + * @f_freeptr: Pointer used by SLAB_TYPESAFE_BY_RCU file cache (don't touch.) */ struct file { atomic_long_t f_count; @@ -1042,6 +1043,7 @@ struct file { struct callback_head f_task_work; struct llist_node f_llist; struct file_ra_state f_ra; + freeptr_t f_freeptr; }; /* --- cacheline 3 boundary (192 bytes) --- */ } __randomize_layout |
