[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170629225621.GN10672@ZenIV.linux.org.uk>
Date: Thu, 29 Jun 2017 23:56:21 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Neil Horman <nhorman@...driver.com>
Cc: linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
Vlad Yasevich <vyasevich@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Andreas Steinmetz <ast@...dv.de>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [PATCH] sctp: Add peeloff-flags socket option
On Thu, Jun 29, 2017 at 02:13:40PM -0400, Neil Horman wrote:
> diff --git a/fs/file.c b/fs/file.c
> index 1c2972e..a4521da 100644
> --- a/fs/file.c
> +++ b/fs/file.c
> @@ -807,6 +807,7 @@ void set_close_on_exec(unsigned int fd, int flag)
> __clear_close_on_exec(fd, fdt);
> spin_unlock(&files->file_lock);
> }
> +EXPORT_SYMBOL(set_close_on_exec);
Huh?
> + set_close_on_exec(peeloff->sd, !!(flags & SOCK_CLOEXEC));
Why hadn't you set it when that descriptor had been allocated?
That
retval = get_unused_fd_flags(0);
could just pass O_CLOEXEC and you'd get it set from the very
beginning...
Powered by blists - more mailing lists