linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: linux-fsdevel@vger.kernel.org
Cc: Jan Kara <jack@suse.com>, Jens Axboe <axboe@kernel.dk>,
	 Carlos Llamas <cmllamas@google.com>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	 Linus Torvalds <torvalds@linux-foundation.org>,
	 Christian Brauner <brauner@kernel.org>
Subject: [PATCH RFC 3/5] fs: replace f_rcuhead with f_tw
Date: Thu, 30 Nov 2023 13:49:09 +0100	[thread overview]
Message-ID: <20231130-vfs-files-fixes-v1-3-e73ca6f4ea83@kernel.org> (raw)
In-Reply-To: <20231130-vfs-files-fixes-v1-0-e73ca6f4ea83@kernel.org>

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_tw.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 fs/file_table.c    | 6 +++---
 include/linux/fs.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/file_table.c b/fs/file_table.c
index 6deac386486d..78614204ef2c 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -407,7 +407,7 @@ static void delayed_fput(struct work_struct *unused)
 
 static void ____fput(struct callback_head *work)
 {
-	__fput(container_of(work, struct file, f_rcuhead));
+	__fput(container_of(work, struct file, f_tw));
 }
 
 /*
@@ -438,8 +438,8 @@ void fput(struct file *file)
 			return;
 		}
 		if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) {
-			init_task_work(&file->f_rcuhead, ____fput);
-			if (!task_work_add(task, &file->f_rcuhead, TWA_RESUME))
+			init_task_work(&file->f_tw, ____fput);
+			if (!task_work_add(task, &file->f_tw, TWA_RESUME))
 				return;
 			/*
 			 * After this task has run exit_task_work(),
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f171505940ff..d23a886df8fa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -992,7 +992,7 @@ static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index)
 struct file {
 	union {
 		struct llist_node	f_llist;
-		struct rcu_head 	f_rcuhead;
+		struct callback_head 	f_tw;
 		unsigned int 		f_iocb_flags;
 	};
 

-- 
2.42.0


  parent reply	other threads:[~2023-11-30 12:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 12:49 [PATCH RFC 0/5] file: minor fixes Christian Brauner
2023-11-30 12:49 ` [PATCH RFC 1/5] file: s/close_fd_get_file()/file_close_fd()/g Christian Brauner
2023-11-30 16:39   ` Jan Kara
2023-11-30 12:49 ` [PATCH RFC 2/5] file: remove pointless wrapper Christian Brauner
2023-11-30 14:22   ` Jens Axboe
2023-11-30 16:40   ` Jan Kara
2023-11-30 12:49 ` Christian Brauner [this message]
2023-11-30 16:42   ` [PATCH RFC 3/5] fs: replace f_rcuhead with f_tw Jan Kara
2023-11-30 23:37   ` Linus Torvalds
2023-12-01 13:19     ` Christian Brauner
2023-11-30 12:49 ` [PATCH RFC 4/5] file: stop exposing receive_fd_user() Christian Brauner
2023-11-30 14:23   ` Jens Axboe
2023-11-30 16:43   ` Jan Kara
2023-11-30 12:49 ` [PATCH RFC 5/5] file: remove __receive_fd() Christian Brauner
2023-11-30 13:20   ` Matthew Wilcox
2023-12-01 13:12     ` Christian Brauner
2023-11-30 16:44   ` Jan Kara
2023-11-30 14:23 ` [PATCH RFC 0/5] file: minor fixes Jens Axboe
2023-12-01 13:23 ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231130-vfs-files-fixes-v1-3-e73ca6f4ea83@kernel.org \
    --to=brauner@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cmllamas@google.com \
    --cc=jack@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).