don't leak O_CLOEXEC into ->f_flags

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2012-08-26 11:01:04 -04:00
commit c6f3d81115
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ static int seq_show(struct seq_file *m, void *v)
if (file) {
struct fdtable *fdt = files_fdtable(files);
f_flags = file->f_flags & ~O_CLOEXEC;
f_flags = file->f_flags;
if (close_on_exec(fd, fdt))
f_flags |= O_CLOEXEC;