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>
This commit is contained in:
Al Viro
2012-08-21 09:56:33 -04:00
parent 723a1d7743
commit 6a6d27de34
3 changed files with 44 additions and 35 deletions

View File

@@ -118,6 +118,7 @@ void put_files_struct(struct files_struct *fs);
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);