From: Eric Dumazet <eric.dumazet@gmail.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] vfs: don't bother clearing close_on_exec bit for unused fds
Date: Tue, 03 Nov 2015 17:31:12 -0800 [thread overview]
Message-ID: <1446600672.4184.1.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1446543679-28849-1-git-send-email-linux@rasmusvillemoes.dk>
On Tue, 2015-11-03 at 10:41 +0100, Rasmus Villemoes wrote:
> @@ -667,7 +667,7 @@ void do_close_on_exec(struct files_struct *files)
> fdt = files_fdtable(files);
> if (fd >= fdt->max_fds)
> break;
> - set = fdt->close_on_exec[i];
> + set = fdt->close_on_exec[i] & fdt->open_fds[i];
> if (!set)
> continue;
> fdt->close_on_exec[i] = 0;
If you don't bother, why leaving this final fdt->close_on_exec[i] = 0 ?
next prev parent reply other threads:[~2015-11-04 1:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 9:41 [RFC] vfs: don't bother clearing close_on_exec bit for unused fds Rasmus Villemoes
2015-11-03 22:45 ` Linus Torvalds
2015-11-03 23:13 ` Rasmus Villemoes
2015-11-04 1:31 ` Eric Dumazet [this message]
2015-11-04 10:59 ` Rasmus Villemoes
2015-11-04 12:33 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446600672.4184.1.camel@edumazet-glaptop2.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).