OSDN Git Service

xprtrdma: Remove rpcrdma_buffer_get_rep_locked()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 4 May 2018 19:35:36 +0000 (15:35 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 7 May 2018 13:20:04 +0000 (09:20 -0400)
Clean up: There is only one remaining call site for this helper.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c

index b9a6e5d..db11aa0 100644 (file)
@@ -1175,17 +1175,6 @@ out:
        return rc;
 }
 
-static struct rpcrdma_rep *
-rpcrdma_buffer_get_rep_locked(struct rpcrdma_buffer *buf)
-{
-       struct rpcrdma_rep *rep;
-
-       rep = list_first_entry(&buf->rb_recv_bufs,
-                              struct rpcrdma_rep, rr_list);
-       list_del(&rep->rr_list);
-       return rep;
-}
-
 static void
 rpcrdma_destroy_rep(struct rpcrdma_rep *rep)
 {
@@ -1239,7 +1228,9 @@ rpcrdma_buffer_destroy(struct rpcrdma_buffer *buf)
        while (!list_empty(&buf->rb_recv_bufs)) {
                struct rpcrdma_rep *rep;
 
-               rep = rpcrdma_buffer_get_rep_locked(buf);
+               rep = list_first_entry(&buf->rb_recv_bufs,
+                                      struct rpcrdma_rep, rr_list);
+               list_del(&rep->rr_list);
                rpcrdma_destroy_rep(rep);
        }