From ead0d62af0df6776c0c72fd81e01fcc4c8faa7b5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 21 Aug 2012 20:09:42 -0400 Subject: [PATCH] --- yaml --- r: 328978 b: refs/heads/master c: b8318b01a8f7f760ae3ecae052ccc7fc123d9508 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/file.c | 20 ++++++++++++++++++++ trunk/include/linux/fdtable.h | 20 -------------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/[refs] b/[refs] index d8179ff27b35..09ff548e02b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ee97cd872d08b8623076f2a63ffb872d0884411a +refs/heads/master: b8318b01a8f7f760ae3ecae052ccc7fc123d9508 diff --git a/trunk/fs/file.c b/trunk/fs/file.c index a7bbe0324478..40ddef9fe041 100644 --- a/trunk/fs/file.c +++ b/trunk/fs/file.c @@ -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/trunk/include/linux/fdtable.h b/trunk/include/linux/fdtable.h index ef4b2137e6bc..9ff26319d44f 100644 --- a/trunk/include/linux/fdtable.h +++ b/trunk/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);