Re: [PATCH] sctp: Add peeloff-flags socket option

From
Al Viro <viro@ZenIV.linux.org.uk>
Date
2017-06-29 22:56:29
Also in
linux-sctp
Reply to
Neil Horman, 2017-06-29
On Thu, Jun 29, 2017 at 02:13:40PM -0400, Neil Horman wrote:
quoted hunk ↗ jump to hunk
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...
Thread (8 messages) 8 messages, 4 authors, last reply 2017-07-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help