net: Remove the err argument from sock_from_file
Currently, the sock_from_file prototype takes an "err" pointer that is either not set or set to -ENOTSOCK IFF the returned socket is NULL. This makes the error redundant and it is ignored by a few callers. This patch simplifies the API by letting callers deduce the error based on whether the returned socket is NULL or not. Suggested-by:Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Florent Revest <revest@google.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Reviewed-by:
KP Singh <kpsingh@google.com> Link: https://lore.kernel.org/bpf/20201204113609.1850150-1-revest@google.com
Showing
- fs/eventpoll.c 1 addition, 2 deletionsfs/eventpoll.c
- fs/io_uring.c 8 additions, 8 deletionsfs/io_uring.c
- include/linux/net.h 1 addition, 1 deletioninclude/linux/net.h
- net/core/netclassid_cgroup.c 1 addition, 2 deletionsnet/core/netclassid_cgroup.c
- net/core/netprio_cgroup.c 1 addition, 2 deletionsnet/core/netprio_cgroup.c
- net/core/sock.c 1 addition, 7 deletionsnet/core/sock.c
- net/socket.c 16 additions, 11 deletionsnet/socket.c
Loading
Please register or sign in to comment