diff options
author | Zach Pfeffer <zach.pfeffer@linaro.org> | 2012-10-17 17:13:25 -0500 |
---|---|---|
committer | Zach Pfeffer <zach.pfeffer@linaro.org> | 2012-10-17 17:13:25 -0500 |
commit | 20d3c18386d1ae00460fe79a33c2c5ada98f468d (patch) | |
tree | 3b9d88853ee43042fc1902f07512e09b824fb8de | |
parent | 270ea3cde9c22629f092d23a65d102c3ff46547b (diff) | |
download | linux-aarch64-20d3c18386d1ae00460fe79a33c2c5ada98f468d.tar.gz |
Revert "take __{set,clear}_{open_fd,close_on_exec}() into fs/file.c"
This reverts commit b8318b01a8f7f760ae3ecae052ccc7fc123d9508.
-rw-r--r-- | fs/file.c | 20 | ||||
-rw-r--r-- | include/linux/fdtable.h | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/fs/file.c b/fs/file.c index 05a94445fb9..c3de9022803 100644 --- a/fs/file.c +++ b/fs/file.c @@ -256,26 +256,6 @@ 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 86b460940c7..5b311e13d70 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h @@ -30,11 +30,31 @@ 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); |