summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/fmr_ops.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2017-02-08 23:00:43 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-02-10 20:02:37 +0100
commit9a5c63e9c4056de8a73555131e6f698ddb0b9e0d (patch)
tree0227175ffb80c311e4296139308072b2c879bca5 /net/sunrpc/xprtrdma/fmr_ops.c
parentxprtrdma: Handle stale connection rejection (diff)
downloadlinux-9a5c63e9c4056de8a73555131e6f698ddb0b9e0d.tar.xz
linux-9a5c63e9c4056de8a73555131e6f698ddb0b9e0d.zip
xprtrdma: Refactor management of mw_list field
Clean up some duplicate code. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/fmr_ops.c')
-rw-r--r--net/sunrpc/xprtrdma/fmr_ops.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sunrpc/xprtrdma/fmr_ops.c b/net/sunrpc/xprtrdma/fmr_ops.c
index 1ebb09e1ac4f..59e64025ed96 100644
--- a/net/sunrpc/xprtrdma/fmr_ops.c
+++ b/net/sunrpc/xprtrdma/fmr_ops.c
@@ -310,10 +310,7 @@ fmr_op_unmap_safe(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req,
struct rpcrdma_mw *mw;
while (!list_empty(&req->rl_registered)) {
- mw = list_first_entry(&req->rl_registered,
- struct rpcrdma_mw, mw_list);
- list_del_init(&mw->mw_list);
-
+ mw = rpcrdma_pop_mw(&req->rl_registered);
if (sync)
fmr_op_recover_mr(mw);
else