diff options
| author | Christian Brauner <[email protected]> | 2023-11-30 13:49:09 +0100 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2023-12-12 14:24:13 +0100 |
| commit | 372a34e66fb7f95124fadae9c600b231c35696a7 (patch) | |
| tree | 5edc7444222b13d09d807f9bad860534c1a1b6e5 /include/linux | |
| parent | 24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d (diff) | |
fs: replace f_rcuhead with f_task_work
The naming is actively misleading since we switched to
SLAB_TYPESAFE_BY_RCU. rcu_head is #define callback_head. Use
callback_head directly and rename f_rcuhead to f_task_work.
Add comments in there to explain what it's used for.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 98b7a7a8c42e..354fd02e0e11 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -991,8 +991,10 @@ static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index) */ struct file { union { + /* fput() uses task work when closing and freeing file (default). */ + struct callback_head f_task_work; + /* fput() must use workqueue (most kernel threads). */ struct llist_node f_llist; - struct rcu_head f_rcuhead; unsigned int f_iocb_flags; }; |