. It might also make sense
to use the same scheme for the gfs2 internal cluster lock.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/bmap.c | 2 --
fs/gfs2/file.c | 6 --
fs/gfs2/glops.c | 10 ++
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2
claim_swapfile now always takes i_rwsem.
Signed-off-by: Christoph Hellwig
---
mm/swapfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index bb3261d45b6a..fe6e4c1add0b 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3157,7 +3157,7
Switch ext4 from the magic i_dio_count scheme to just hold i_rwsem
until the actual I/O has completed to reduce the locking complexity
and avoid nasty bugs due to missing inode_dio_wait calls.
Signed-off-by: Christoph Hellwig
---
fs/ext4/extents.c | 12
fs/ext4/file.c
Switch ext4 from the magic i_dio_count scheme to just hold i_rwsem
until the actual I/O has completed to reduce the locking complexity
and avoid nasty bugs due to missing inode_dio_wait calls.
Signed-off-by: Christoph Hellwig
---
fs/xfs/scrub/bmap.c| 1 -
fs/xfs/xfs_bmap_util.c | 3
Direct I/O reads can also be used with RWF_NOWAIT & co. Fix the inode
locking in xfs_file_dio_aio_read to take IOCB_NOWAIT into account.
Signed-off-by: Christoph Hellwig
---
fs/xfs/xfs_file.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_file.c b/fs
Only set current->backing_dev_info just around the buffered write calls
to prepare for the next fix.
Signed-off-by: Christoph Hellwig
---
fs/gfs2/file.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 9d58295cc
Replace the wait_for_completion flag in struct iomap_dio with a new
IOMAP_DIO_SYNCHRONOUS flag for dio->flags, and allow passing the
initial flags to iomap_dio_rw. Also take the check for synchronous
iocbs into iomap_dio_rw instead of duplicating it in all the callers.
Signed-off-by: Christ
Don't ignore the return value from generic_write_sync for the direct to
buffered I/O callback case when written is non-zero. Also don't bother
to call generic_write_sync for the pure direct I/O case, as iomap_dio_rw
already takes care of that.
Signed-off-by: Christoph Hellwig
---
fs/gfs2
Now that i_rwsem is held until asynchronous writes complete, there
is no need to force them to execute synchronously, as the i_rwsem
protection is exactly the same as for synchronous writes.
Signed-off-by: Christoph Hellwig
---
fs/xfs/xfs_file.c | 12 +++-
1 file changed, 3 insertions
Now that all iomap users hold i_rwsem over asynchronous I/O
operations these calls can be removed.
Signed-off-by: Christoph Hellwig
---
fs/iomap/direct-io.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 0113ac33b0a0..c90ec82e8e08 100644
the task_struct ->on_cpu field of a -8 value.
XXX: This might be a bit of a hack as the code otherwise doesn't use
the ERR_PTR family macros, better suggestions welcome.
Signed-off-by: Christoph Hellwig
---
kernel/locking/rwsem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/locking/rwsem.
Hi all,
Asynchronous read/write operations currently use a rather magic locking
scheme, were access to file data is normally protected using a rw_semaphore,
but if we are doing aio where the syscall returns to userspace before the
I/O has completed we also use an atomic_t to track the outstanding
Add a helper to directly set the TCP_CORK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 14
drivers
Add a helper to directly set the IP_FREEBIND sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/target/iscsi/iscsi_target_login.c | 13 +++--
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c
Add a helper to directly set the SO_LINGER sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/tcp.c | 9 +
drivers/nvme/target/tcp.c | 6 +-
include/net/sock.h| 1 +
net/core/sock.c | 36
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 7 +-
include/net/sock.h | 1 +
net/core/sock.c| 59 +-
3 files changed
Add a helper to directly set the TCP_NODELAY sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 7
Prepare for additional kernel-space callers of sctp_setsockopt_bindx.
Signed-off-by: Christoph Hellwig
---
net/sctp/socket.c | 71 ++-
1 file changed, 27 insertions(+), 44 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 34 --
2 files changed, 36 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index ece7513326293..e10f378194a59 100644
--- a/include/linux
And call it directly from dlm instead of going through kernel_setsockopt.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 13 -
include/net/sctp/sctp.h | 3 +++
net/sctp/socket.c | 5 +++--
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/fs/dlm
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 1 +
net/ipv6/ipv6_sockglue.c | 127 +--
net/sunrpc/xprtsock.c| 8
Add a helper to directly get the SCTP_PRIMARY_ADDR sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 11 +++-
include/net/sctp/sctp.h | 1 +
net/sctp/socket.c | 57
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 1 +
net/ipv6/ipv6_sockglue.c | 8
net/sunrpc/svcsock.c | 11 +++
3 files changed, 12
Add a helper to directly set the IP_TOS sockopt from kernel space without
going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/tcp.c | 14 +++---
drivers/nvme/target/tcp.c | 10 ++
include/net/ip.h | 2 ++
net/ipv4/ip_sockglue.c
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h| 1 +
net/core/sock.c | 8
net/sunrpc/xprtsock.c | 17 +
3 files changed, 10 insertions
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can
just use the internal helper. The only change needed is to pass a struct
sock instead of tipc_sock, which is private to socket.c
Signed-off-by: Christoph Hellwig
---
net/tipc/socket.c | 18 +-
net/tipc
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 10 ++
include/net/sctp/sctp.h | 1 +
net/sctp/socket.c | 8
3 files changed, 11 insertions(+), 8
Add a helper to directly set the IPV6_RECVERR sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 1 +
net/ipv6/ipv6_sockglue.c | 10 ++
net/rxrpc/local_object.c | 10 ++
3 files changed, 13 insertions
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from
kernel space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/afs/rxrpc.c | 6 ++
include/net/af_rxrpc.h | 2 ++
net/rxrpc/af_rxrpc.c | 13 +
3 files changed, 17
Add a helper to directly set the IP_RECVERR sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 10 ++
net/rxrpc/local_object.c | 8 +---
3 files changed, 12 insertions
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 31 ---
2 files changed, 33 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 6451425e828f5..ece7513326293 100644
--- a/include/linux/net.h
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/ocfs2/cluster/tcp.c | 22 ++
include/linux/tcp.h| 1 +
net/ipv4/tcp.c | 8
net/sunrpc/xprtsock.c
Add a helper to directly set the TCP_KEEP_IDLE sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 49 ++-
net/rds/tcp_listen.c | 5 +
net/sunrpc
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 7 --
drivers
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h| 1 +
net/core/sock.c | 21 +++--
net/ipv4/udp_tunnel.c | 4 +---
net/ipv6
Add a helper to directly set the SO_TIMESTAMP* sockopts from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h | 1 +
net/core/sock.c | 47 +---
net/rxrpc/local_object.c | 8 +--
3
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 6 +-
include/net/sock.h| 1 +
net/core/sock.c | 10 ++
net/rds/tcp_listen.c | 6 +-
net
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/tcp.c | 9 +
include/linux/tcp.h | 1 +
net/ipv4/tcp.c | 12
3 files changed, 14 insertions
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 12
net/rds/tcp_listen.c | 4 +---
net/sunrpc/xprtsock.c | 3 +--
4 files
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel
space without going through a fake uaccess. The interface is
simplified to only pass the seconds value, as that is the only
thing needed at the moment.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 8
.
Signed-off-by: Christoph Hellwig
---
drivers/infiniband/sw/siw/siw_cm.c| 18 +-
drivers/nvme/target/tcp.c | 8 +---
drivers/target/iscsi/Kconfig | 2 +-
drivers/target/iscsi/iscsi_target_login.c | 9 +
fs/dlm/lowcomms.c
Add a helper to directly set the SO_PRIORITY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/nvme/host/tcp.c | 12 ++--
drivers/nvme/target/tcp.c | 18 --
include/net/sock.h| 1 +
net/core/sock.c
On Fri, May 15, 2020 at 04:20:02PM +0100, David Howells wrote:
> Christoph Hellwig wrote:
>
> > > The advantage on using kernel_setsockopt here is that sctp module will
> > > only be loaded if dlm actually creates a SCTP socket. With this
> > > change, sctp
On Wed, May 13, 2020 at 03:00:58PM -0300, Marcelo Ricardo Leitner wrote:
> On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote:
> > And call it directly from dlm instead of going through kernel_setsockopt.
>
> The advantage on using kernel_setsockopt here is t
On Wed, May 13, 2020 at 10:38:59AM -0700, Joe Perches wrote:
> It might be useful to show overall object size change.
>
> More EXPORT_SYMBOL uses increase object size a little.
>
> And not sure it matters much except it reduces overall object
> size, but these patches remove (unnecessary)
On Wed, May 13, 2020 at 02:17:41PM +0100, David Howells wrote:
> Christoph Hellwig wrote:
>
> > + ip_sock_set_mtu_discover(conn->params.local->socket->sk,
> > + IP_PMTUDISC_DONT);
>
> Um... The socket in question could be an
On Thu, May 14, 2020 at 08:29:30AM +, David Laight wrote:
> You need to export functions that do most of the socket options
> for all protocols.
Only for those were we have users, and all those are covered.
On Thu, May 14, 2020 at 10:26:41AM +, David Laight wrote:
> From: Christoph Hellwig
> > Only for those were we have users, and all those are covered.
>
> What do we tell all our users when our kernel SCTP code
> no longer works?
We only care about in-tree modules, just li
On Wed, May 13, 2020 at 03:00:58PM -0300, Marcelo Ricardo Leitner wrote:
> On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote:
> > And call it directly from dlm instead of going through kernel_setsockopt.
>
> The advantage on using kernel_setsockopt here is t
On Wed, May 13, 2020 at 02:00:43PM -0700, Joe Perches wrote:
> On Wed, 2020-05-13 at 08:26 +0200, Christoph Hellwig wrote:
> > Add a helper to directly set the IP_RECVERR sockopt from kernel space
> > without going through a fake uaccess.
>
> This seems used only with t
On Wed, May 13, 2020 at 02:13:07PM +0100, David Howells wrote:
> Christoph Hellwig wrote:
>
> > +int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val);
> > +
>
> Looks good - but you do need to add this to Documentation/networking/rxrpc.txt
> also,
Any plans to resend this with the little nitpicks fixed? I'd love to
get this series into 5.7..
William Kucharski
Looks good,
Reviewed-by: Christoph Hellwig
On Thu, May 14, 2020 at 04:51:26AM -0700, Joe Perches wrote:
> > Mostly to keep it symmetric with the sockopt. I could probably remove
> > a few arguments in the series if we want to be strict.
>
> My preference would use strict and add
> arguments only when necessary.
In a few cases that would
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 31 ---
2 files changed, 33 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 74ef5d7315f70..e10f378194a59 100644
--- a/include/linux/net.h
Add a helper to directly set the IPV6_V6ONLY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h| 11 +++
net/ipv6/ip6_udp_tunnel.c | 5 +
net/sunrpc/svcsock.c | 6 +-
3 files changed, 13
space.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 9 +++--
include/net/sock.h | 6 +-
net/core/sock.c| 8
net/sctp/socket.c | 23 +++
4 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 10 ++
include/net/sctp/sctp.h | 7 +++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/fs/dlm
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 7 +++
net/sunrpc/svcsock.c | 10 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include
Add a helper to directly set the IP_FREEBIND sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
drivers/target/iscsi/iscsi_target_login.c | 13 +++--
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c
Add a helper to directly set the IP_RECVERR sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Reviewed-by: David Howells
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 8
net/rxrpc/local_object.c | 8 +---
3 files
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 12
net/rds/tcp.h | 2 +-
net/rds/tcp_listen.c | 17
Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from
kernel space without going through a fake uaccess.
Thanks to David Howells for the documentation updates.
Signed-off-by: Christoph Hellwig
---
Documentation/networking/rxrpc.rst | 13 +++--
fs/afs/rxrpc.c
Add a helper to directly set the IPV6_ADD_PREFERENCES sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 67
net/ipv6/ipv6_sockglue.c | 59
Avoid using kernel_setsockopt for the TIPC_IMPORTANCE option when we can
just use the internal helper. The only change needed is to pass a struct
sock instead of tipc_sock, which is private to socket.c
Signed-off-by: Christoph Hellwig
---
net/tipc/socket.c | 18 +-
net/tipc
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 12
net/rds/tcp_listen.c | 4 +---
net/sunrpc/xprtsock.c | 3 +--
4 files
Add a helper to directly set the IP_PKTINFO sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 8
net/sunrpc/svcsock.c | 5 ++---
3 files changed, 11 insertions(+), 3 deletions
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/ocfs2/cluster/tcp.c | 22 ++
include/linux/tcp.h| 1 +
net/ipv4/tcp.c | 8
net/sunrpc/xprtsock.c
Add a helper to directly set the IP_MTU_DISCOVER sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Reviewed-by: David Howells [rxrpc bits]
---
include/net/ip.h | 1 +
net/ipv4/ip_sockglue.c | 11 +++
net/rxrpc/local_object.c
Add a helper to directly set the IP_TOS sockopt from kernel space without
going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 14 +++---
drivers/nvme/target/tcp.c | 10 ++
include/net/ip.h | 2 ++
net
Add a helper to directly enable timestamps instead of setting the
SO_TIMESTAMP* sockopts from kernel space and going through a fake
uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h | 1 +
net/core/sock.c | 47 +---
net/rxrpc
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 7 --
drivers
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 34 --
2 files changed, 36 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 6451425e828f5..74ef5d7315f70 100644
--- a/include/linux
Add a helper to directly set the TCP_SYNCNT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 9 +
include/linux/tcp.h | 1 +
net/ipv4/tcp.c | 12
3 files
Add a helper to directly set the TCP_CORK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 14
drivers
Add a helper to directly set the SO_PRIORITY sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 12 ++--
drivers/nvme/target/tcp.c | 18 --
include/net/sock.h
Add a helper to directly set the SO_BINDTOIFINDEX sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h| 1 +
net/core/sock.c | 21 +++--
net/ipv4/udp_tunnel.c | 4 +---
net/ipv6
any reason for the different way of quering the
peername, or all the code duplication.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 123 ++
1 file changed, 3 insertions(+), 120 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
in
Add a helper to directly set the SO_REUSEPORT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/sock.h| 1 +
net/core/sock.c | 8
net/sunrpc/xprtsock.c | 17 +
3 files changed, 10 insertions
Add a helper to directly set the SO_SNDTIMEO_NEW sockopt from kernel
space without going through a fake uaccess. The interface is
simplified to only pass the seconds value, as that is the only
thing needed at the moment.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 8
Add a helper to directly set the TCP_NODELAY sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
Acked-by: Jason Gunthorpe
---
drivers
Add a helper to directly set the SO_RCVBUFFORCE sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 7 +-
include/net/sock.h | 1 +
net/core/sock.c| 59 +-
3 files changed
Add a helper to directly set the SO_LINGER sockopt from kernel space
with onoff set to true and a linger time of 0 without going through a
fake uaccess.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
---
drivers/nvme/host/tcp.c | 9 +
drivers/nvme/target/tcp.c | 6
Add a helper to directly set the SO_KEEPALIVE sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 6 +-
include/net/sock.h| 1 +
net/core/sock.c | 10 ++
net/rds/tcp_listen.c | 6 +-
net
On Wed, May 20, 2020 at 08:00:25PM -0300, Marcelo Ricardo Leitner wrote:
> > + if (err)
> > + return err;
> > +
> > + lock_sock(sk);
> > + err = sctp_do_bind(sk, (union sctp_addr *)addr, af->sockaddr_len);
> > + if (!err)
> > + err = sctp_send_asconf_add_ip(sk, addr,
On Thu, May 21, 2020 at 08:01:33AM +, David Laight wrote:
> How much does this increase the kernel code by?
44 files changed, 660 insertions(+), 843 deletions(-)
> You are also replicating a lot of code making it more
> difficult to maintain.
No, I specifically don't.
> I don't think the
On Thu, May 21, 2020 at 09:06:19AM +, David Laight wrote:
> > > The comment still applies, though. (re the duplication)
> >
> > Where do you see duplication?
>
> The whole thing just doesn't scale.
>
> As soon as you get to the slightly more complex requests
> like SCTP_INITMSG (which
On Wed, May 20, 2020 at 09:54:36PM +0200, Christoph Hellwig wrote:
> Hi Dave,
>
> this series removes the kernel_setsockopt and kernel_getsockopt
> functions, and instead switches their users to small functions that
> implement setting (or in one case getting) a sockopt directly u
any
> dirty pages in that range, the write will fail and a "Page cache
> invalidation failure on direct I/O" error will be logged.
Looks good,
Reviewed-by: Christoph Hellwig
> - kaddr = kmap(pp);
> + kaddr = kmap_thread(pp);
> memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE);
> - kunmap(pp);
> + kunmap_thread(pp);
You only Cced me on this particular patch, which means I have absolutely
no idea what kmap_thread and kunmap_thread
any reason for the different way of quering the
peername, or all the code duplication.
Signed-off-by: Christoph Hellwig
---
fs/dlm/lowcomms.c | 123 ++
1 file changed, 3 insertions(+), 120 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
in
No users left.
Signed-off-by: Christoph Hellwig
---
include/linux/net.h | 2 --
net/socket.c| 34 --
2 files changed, 36 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 6451425e828f5..74ef5d7315f70 100644
--- a/include/linux
Hi dear maintainers,
this series reduces scope from the last round and just removes
kernel_getsockopt to avoid conflicting with the sctp cleanup series.
Add a helper to directly set the IPV6_RECVPKTINFO sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/net/ipv6.h | 7 +++
net/sunrpc/svcsock.c | 10 ++
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include
Add a helper to directly set the IPV6_RECVERR sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
Reviewed-by: David Howells
---
include/net/ipv6.h | 7 +++
net/rxrpc/local_object.c | 10 ++
2 files changed, 9 insertions(+), 8
Add a helper to directly set the TCP_QUICKACK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 7 --
drivers
Add a helper to directly set the TCP_KEEPCNT sockopt from kernel space
without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
include/linux/tcp.h | 1 +
net/ipv4/tcp.c| 12
net/rds/tcp.h | 2 +-
net/rds/tcp_listen.c | 17
Add a helper to directly set the TCP_CORK sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 14
drivers
Add a helper to directly set the TCP_USER_TIMEOUT sockopt from kernel
space without going through a fake uaccess.
Signed-off-by: Christoph Hellwig
---
fs/ocfs2/cluster/tcp.c | 22 ++
include/linux/tcp.h| 1 +
net/ipv4/tcp.c | 8
net/sunrpc/xprtsock.c
Add a helper to directly set the TCP_NODELAY sockopt from kernel space
without going through a fake uaccess. Cleanup the callers to avoid
pointless wrappers now that this is a simple function call.
Signed-off-by: Christoph Hellwig
Acked-by: Sagi Grimberg
Acked-by: Jason Gunthorpe
---
drivers
401 - 500 of 976 matches
Mail list logo