OSDN Git Service

dlm: use the tcp version of accept_from_sock for sctp as well
authorChristoph Hellwig <hch@lst.de>
Wed, 27 May 2020 18:22:28 +0000 (20:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 22:11:33 +0000 (15:11 -0700)
commit0774dc7643db525f0bb9d0aa212cbfad3a412fc6
tree1068537c5954eb53f586a30b0d8b7ffacb785d31
parent50ce4c099bebf56be86c9448f7f4bcd34f33663c
dlm: use the tcp version of accept_from_sock for sctp as well

The only difference between a few missing fixes applied to the SCTP
one is that TCP uses ->getpeername to get the remote address, while
SCTP uses kernel_getsockopt(.. SCTP_PRIMARY_ADDR).  But given that
getpeername is defined to return the primary address for sctp, there
doesn't seem to be any reason for the different way of quering the
peername, or all the code duplication.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
fs/dlm/lowcomms.c