All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
Cc: Christian Brauner <christian@brauner.io>
Subject: [PATCH 2/6] fd_is_open(): move to fs/file.c
Date: Sat, 6 Apr 2024 05:57:30 +0100	[thread overview]
Message-ID: <20240406045730.GB1632446@ZenIV> (raw)
In-Reply-To: <20240406045622.GY538574@ZenIV>

no users outside that...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/file.c               | 5 +++++
 include/linux/fdtable.h | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/file.c b/fs/file.c
index eff5ce79f66a..ab38b005633c 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -271,6 +271,11 @@ static inline void __clear_open_fd(unsigned int fd, struct fdtable *fdt)
 	__clear_bit(fd / BITS_PER_LONG, fdt->full_fds_bits);
 }
 
+static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt)
+{
+	return test_bit(fd, fdt->open_fds);
+}
+
 static unsigned int count_open_files(struct fdtable *fdt)
 {
 	unsigned int size = fdt->max_fds;
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index cc060b20502b..2944d4aa413b 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -33,11 +33,6 @@ struct fdtable {
 	struct rcu_head rcu;
 };
 
-static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt)
-{
-	return test_bit(fd, fdt->open_fds);
-}
-
 /*
  * Open file table structure
  */
-- 
2.39.2


  parent reply	other threads:[~2024-04-06  4:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06  4:56 [PATCHES] misc stuff that should've been pushed in the last window Al Viro
2024-04-06  4:57 ` [PATCH 1/6] close_on_exec(): pass files_struct instead of fdtable Al Viro
2024-04-09  9:21   ` Christian Brauner
2024-04-06  4:57 ` Al Viro [this message]
2024-04-09  9:21   ` [PATCH 2/6] fd_is_open(): move to fs/file.c Christian Brauner
2024-04-06  5:00 ` [PATCH 3/6] get_file_rcu(): no need to check for NULL separately Al Viro
2024-04-09  9:23   ` Christian Brauner
2024-04-06  5:01 ` [PATCH 4/6] kernel_file_open(): get rid of inode argument Al Viro
2024-04-09  9:24   ` Christian Brauner
2024-04-06  5:01 ` [PATCH 5/6] do_dentry_open(): kill " Al Viro
2024-04-09  9:25   ` Christian Brauner
2024-04-06  5:02 ` [PATCH 6/6] remove call_{read,write}_iter() functions Al Viro
2024-04-09  9:26   ` 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=20240406045730.GB1632446@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=christian@brauner.io \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.