fd_is_open(): move to fs/file.c
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 5 Jan 2024 02:45:47 +0000 (21:45 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 15 Apr 2024 20:03:24 +0000 (16:03 -0400)
no users outside that...

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/file.c
include/linux/fdtable.h

index eff5ce79f66a6760d95808cb99fa29f2dcd3f617..ab38b005633cf8e817b737c1948d93622e05480c 100644 (file)
--- 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;
index cc060b20502b415a1bc2ab86980085a3caa66fa3..2944d4aa413b75564b25f2b5104fec5303d762ae 100644 (file)
@@ -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
  */