mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
net: make ->{get,set}sockopt in proto_ops optional
Just check for a NULL method instead of wiring up sock_no_{get,set}sockopt. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3021ad5299
commit
a44d9e7210
26 changed files with 11 additions and 73 deletions
|
@ -714,8 +714,6 @@ static const struct proto_ops unix_stream_ops = {
|
|||
#endif
|
||||
.listen = unix_listen,
|
||||
.shutdown = unix_shutdown,
|
||||
.setsockopt = sock_no_setsockopt,
|
||||
.getsockopt = sock_no_getsockopt,
|
||||
.sendmsg = unix_stream_sendmsg,
|
||||
.recvmsg = unix_stream_recvmsg,
|
||||
.mmap = sock_no_mmap,
|
||||
|
@ -741,8 +739,6 @@ static const struct proto_ops unix_dgram_ops = {
|
|||
#endif
|
||||
.listen = sock_no_listen,
|
||||
.shutdown = unix_shutdown,
|
||||
.setsockopt = sock_no_setsockopt,
|
||||
.getsockopt = sock_no_getsockopt,
|
||||
.sendmsg = unix_dgram_sendmsg,
|
||||
.recvmsg = unix_dgram_recvmsg,
|
||||
.mmap = sock_no_mmap,
|
||||
|
@ -767,8 +763,6 @@ static const struct proto_ops unix_seqpacket_ops = {
|
|||
#endif
|
||||
.listen = unix_listen,
|
||||
.shutdown = unix_shutdown,
|
||||
.setsockopt = sock_no_setsockopt,
|
||||
.getsockopt = sock_no_getsockopt,
|
||||
.sendmsg = unix_seqpacket_sendmsg,
|
||||
.recvmsg = unix_seqpacket_recvmsg,
|
||||
.mmap = sock_no_mmap,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue