Skip to content

Commit e818bd0

Browse files
Olga KornievskaiaTrond Myklebust
authored andcommitted
NFSv4.1 remove xprt from xprt_switch if session trunking test fails
If we are doing a session trunking test and it fails for the transport, then remove this transport from the xprt_switch group. Signed-off-by: Olga Kornievskaia <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 497e646 commit e818bd0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8922,6 +8922,9 @@ void nfs4_test_session_trunk(struct rpc_clnt *clnt, struct rpc_xprt *xprt,
89228922

89238923
if (status == 0)
89248924
rpc_clnt_xprt_switch_add_xprt(clnt, xprt);
8925+
else if (rpc_clnt_xprt_switch_has_addr(clnt,
8926+
(struct sockaddr *)&xprt->addr))
8927+
rpc_clnt_xprt_switch_remove_xprt(clnt, xprt);
89258928

89268929
rpc_put_task(task);
89278930
}

0 commit comments

Comments
 (0)