* [PATCH] SUNRPC: correct error code comment in xs_tcp_setup_socket()
@ 2020-10-24 21:36 Calum Mackay
0 siblings, 0 replies; only message in thread
From: Calum Mackay @ 2020-10-24 21:36 UTC (permalink / raw)
To: trondmy, anna.schumaker; +Cc: linux-nfs
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>
---
net/sunrpc/xprtsock.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 554e1bb4c1c7..3f11de5ad486 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2278,10 +2278,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);
--
2.18.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-24 21:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24 21:36 [PATCH] SUNRPC: correct error code comment in xs_tcp_setup_socket() Calum Mackay
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.