Skip to content

Commit 27adc78

Browse files
author
Trond Myklebust
committed
SUNRPC: Use the ENOTCONN error on socket disconnect
When the socket is closed, we currently send an EAGAIN error to all pending requests in order to ask them to retransmit. Use ENOTCONN instead, to ensure that they try to reconnect before attempting to transmit. This also helps SOFTCONN tasks to behave correctly in this situation. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 5131496 commit 27adc78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/xprt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ void xprt_disconnect_done(struct rpc_xprt *xprt)
664664
spin_lock_bh(&xprt->transport_lock);
665665
xprt_clear_connected(xprt);
666666
xprt_clear_write_space_locked(xprt);
667-
xprt_wake_pending_tasks(xprt, -EAGAIN);
667+
xprt_wake_pending_tasks(xprt, -ENOTCONN);
668668
spin_unlock_bh(&xprt->transport_lock);
669669
}
670670
EXPORT_SYMBOL_GPL(xprt_disconnect_done);

0 commit comments

Comments
 (0)