Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit c4aab26

Browse files
author
Al Viro
committed
fd_is_open(): move to fs/file.c
no users outside that... Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent f60d374 commit c4aab26

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fs/file.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ static inline void __clear_open_fd(unsigned int fd, struct fdtable *fdt)
271271
__clear_bit(fd / BITS_PER_LONG, fdt->full_fds_bits);
272272
}
273273

274+
static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt)
275+
{
276+
return test_bit(fd, fdt->open_fds);
277+
}
278+
274279
static unsigned int count_open_files(struct fdtable *fdt)
275280
{
276281
unsigned int size = fdt->max_fds;

include/linux/fdtable.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ struct fdtable {
3333
struct rcu_head rcu;
3434
};
3535

36-
static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt)
37-
{
38-
return test_bit(fd, fdt->open_fds);
39-
}
40-
4136
/*
4237
* Open file table structure
4338
*/

0 commit comments

Comments
 (0)