]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/file.c
take __{set,clear}_{open_fd,close_on_exec}() into fs/file.c
[karo-tx-linux.git] / fs / file.c
index a7bbe032447864f21c6cd9ceb16a7e7503dd6359..40ddef9fe041b529d99c5901337a1b7f4c585201 100644 (file)
--- 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;