]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Improve locking around rpcrdma_rep destruction
authorChuck Lever <chuck.lever@oracle.com>
Sat, 24 Apr 2021 19:02:28 +0000 (15:02 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 26 Apr 2021 13:22:29 +0000 (09:22 -0400)
commite9dd6c309d418a06e9f9b1fafcfd0304c1cb1212
tree6fe16b108cf0e2181e8bbe4cdfe9601cc1916566
parent9fce7954e076ca34df57b7398e11158783579757
xprtrdma: Improve locking around rpcrdma_rep destruction

Currently rpcrdma_reps_destroy() assumes that, at transport
tear-down, the content of the rb_free_reps list is the same as the
content of the rb_all_reps list. Although that is usually true,
using the rb_all_reps list should be more reliable because of
the way it's managed. And, rpcrdma_reps_unmap() uses rb_all_reps;
these two functions should both traverse the "all" list.

Ensure that all rpcrdma_reps are always destroyed whether they are
on the rep free list or not.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprtrdma/verbs.c