scsi: iscsi: iscsi_tcp: Set no linger
authorMike Christie <michael.christie@oracle.com>
Tue, 25 May 2021 18:18:01 +0000 (13:18 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 2 Jun 2021 05:28:20 +0000 (01:28 -0400)
commitc0920cd36f17f0729927b33009ca586be50e3d9b
treee83da0c1745414042980ee51746af566b9d4f728
parent23d6fefbb3f6b1cc29794427588b470ed06ff64e
scsi: iscsi: iscsi_tcp: Set no linger

Userspace (open-iscsi based tools at least) sets no linger on the socket to
prevent stale data from being sent. However, with the in-kernel cleanup if
userspace is not up the sockfd_put will release the socket without having
set that sockopt.

iscsid sets that opt at socket close time, but it seems ok to set this at
setup time in the kernel for all tools.

Link: https://lore.kernel.org/r/20210525181821.7617-9-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/iscsi_tcp.c