From 814d087e614dca8d58a1c90834846b3293b05a52 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 26 Aug 2012 11:01:04 -0400 Subject: [PATCH] --- yaml --- r: 328986 b: refs/heads/master c: c6f3d81115989e274c42a852222b80d2e14ced6f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/open.c | 2 +- trunk/fs/proc/fd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 638f2192770d..9ebd71ac177c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ddd3e0771bc7b869c550687c204e21f0155d5496 +refs/heads/master: c6f3d81115989e274c42a852222b80d2e14ced6f diff --git a/trunk/fs/open.c b/trunk/fs/open.c index 30760017deed..03028d0e7487 100644 --- a/trunk/fs/open.c +++ b/trunk/fs/open.c @@ -814,7 +814,7 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o op->mode = 0; /* Must never be set by userspace */ - flags &= ~FMODE_NONOTIFY; + flags &= ~FMODE_NONOTIFY & ~O_CLOEXEC; /* * O_SYNC is implemented as __O_SYNC|O_DSYNC. As many places only diff --git a/trunk/fs/proc/fd.c b/trunk/fs/proc/fd.c index 9cef449c0f76..f28a875f8779 100644 --- a/trunk/fs/proc/fd.c +++ b/trunk/fs/proc/fd.c @@ -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;