diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-22 00:09:42 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-27 01:09:58 (GMT) |
commit | b8318b01a8f7f760ae3ecae052ccc7fc123d9508 (patch) | |
tree | 5389ad9fb3a868c838fa816a5476a58326d1fad9 | |
parent | ee97cd872d08b8623076f2a63ffb872d0884411a (diff) | |
download | linux-b8318b01a8f7f760ae3ecae052ccc7fc123d9508.tar.xz |
take __{set,clear}_{open_fd,close_on_exec}() into fs/file.c
nobody uses those outside anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/file.c | 20 | ||||
-rw-r--r-- | include/linux/fdtable.h | 20 |
2 files changed, 20 insertions, 20 deletions
@@ -256,6 +256,26 @@ int expand_files(struct files_struct *files, int nr) return expand_fdtable(files, nr); } +static inline void __set_close_on_exec(int fd, struct fdtable *fdt) +{ + __set_bit(fd, fdt->close_on_exec); +} + +static inline void __clear_close_on_exec(int fd, struct fdtable *fdt) +{ + __clear_bit(fd, fdt->close_on_exec); +} + +static inline void __set_open_fd(int fd, struct fdtable *fdt) +{ + __set_bit(fd, fdt->open_fds); +} + +static inline void __clear_open_fd(int fd, struct fdtable *fdt) +{ + __clear_bit(fd, fdt->open_fds); +} + static int count_open_files(struct fdtable *fdt) { int size = fdt->max_fds; diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index ef4b213..9ff2631 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h @@ -30,31 +30,11 @@ struct fdtable { struct fdtable *next; }; -static inline void __set_close_on_exec(int fd, struct fdtable *fdt) -{ - __set_bit(fd, fdt->close_on_exec); -} - -static inline void __clear_close_on_exec(int fd, struct fdtable *fdt) -{ - __clear_bit(fd, fdt->close_on_exec); -} - static inline bool close_on_exec(int fd, const struct fdtable *fdt) { return test_bit(fd, fdt->close_on_exec); } -static inline void __set_open_fd(int fd, struct fdtable *fdt) -{ - __set_bit(fd, fdt->open_fds); -} - -static inline void __clear_open_fd(int fd, struct fdtable *fdt) -{ - __clear_bit(fd, fdt->open_fds); -} - static inline bool fd_is_open(int fd, const struct fdtable *fdt) { return test_bit(fd, fdt->open_fds); |