summaryrefslogtreecommitdiff
path: root/fs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-21 20:09:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:09:58 -0400
commitb8318b01a8f7f760ae3ecae052ccc7fc123d9508 (patch)
tree5389ad9fb3a868c838fa816a5476a58326d1fad9 /fs/file.c
parentee97cd872d08b8623076f2a63ffb872d0884411a (diff)
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>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/file.c b/fs/file.c
index a7bbe0324478..40ddef9fe041 100644
--- a/fs/file.c
+++ b/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;