]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
SUNRPC: correct error code comment in xs_tcp_setup_socket()
authorCalum Mackay <calum.mackay@oracle.com>
Sat, 24 Oct 2020 21:36:38 +0000 (22:36 +0100)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 1 Feb 2021 15:32:28 +0000 (10:32 -0500)
This comment was introduced by commit 6ea44adce915
("SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()").

I believe EIO was a typo at the time: it should have been EAGAIN.

Subsequently, commit 0445f92c5d53 ("SUNRPC: Fix disconnection races")
changed that to ENOTCONN.

Rather than trying to keep the comment here in sync with the code in
xprt_force_disconnect(), make the point in a non-specific way.

Fixes: 6ea44adce915 ("SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()")
Signed-off-by: Calum Mackay <calum.mackay@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtsock.c

index c56a66cdf4ac80d8cab6cd72c90fd86155013e3b..2e84da64200ec6842f4223def6a61222be3fb0f3 100644 (file)
@@ -2276,10 +2276,8 @@ static void xs_tcp_setup_socket(struct work_struct *work)
        case -EHOSTUNREACH:
        case -EADDRINUSE:
        case -ENOBUFS:
-               /*
-                * xs_tcp_force_close() wakes tasks with -EIO.
-                * We need to wake them first to ensure the
-                * correct error code.
+               /* xs_tcp_force_close() wakes tasks with a fixed error code.
+                * We need to wake them first to ensure the correct error code.
                 */
                xprt_wake_pending_tasks(xprt, status);
                xs_tcp_force_close(xprt);