take close-on-exec logics to fs/file.c, clean it up a bit
... and add cond_resched() there, while we are at it. We can
get large latencies as is...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 59488f2..ef4b213 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -118,6 +118,7 @@
void reset_files_struct(struct files_struct *);
int unshare_files(struct files_struct **);
struct files_struct *dup_fd(struct files_struct *, int *);
+void do_close_on_exec(struct files_struct *);
extern int __alloc_fd(struct files_struct *files,
unsigned start, unsigned end, unsigned flags);