Skip to content

Commit 10f0740

Browse files
neilbrownAnna Schumaker
authored andcommitted
sunrpc: handle -ENOTCONN in xs_tcp_setup_socket()
xs_tcp_finish_connecting() can return -ENOTCONN but the switch statement in xs_tcp_setup_socket() treats that as an unhandled error. If we treat it as a known error it would propagate back to call_connect_status() which does handle that error code. This appears to be the intention of the commit (given below) which added -ENOTCONN as a return status for xs_tcp_finish_connecting(). So add -ENOTCONN to the switch statement as an error to pass through to the caller. Link: https://bugzilla.suse.com/show_bug.cgi?id=1231050 Link: https://access.redhat.com/discussions/3434091 Fixes: 01d37c4 ("SUNRPC: xprt_connect() don't abort the task if the transport isn't bound") Signed-off-by: NeilBrown <[email protected]> Reviewed-by: Benjamin Coddington <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 59b723c commit 10f0740

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sunrpc/xprtsock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)
24592459
case -EHOSTUNREACH:
24602460
case -EADDRINUSE:
24612461
case -ENOBUFS:
2462+
case -ENOTCONN:
24622463
break;
24632464
default:
24642465
printk("%s: connect returned unhandled error %d\n",

0 commit comments

Comments
 (0)