svcrdma: Clean up RPCRDMA_DEF_GFP
authorChuck Lever <chuck.lever@oracle.com>
Fri, 23 Sep 2022 13:06:05 +0000 (09:06 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 5 Oct 2022 19:47:16 +0000 (15:47 -0400)
xprt_rdma_bc_allocate() is now the only user of RPCRDMA_DEF_GFP.
Replace that macro with the raw flags.

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

index 85c8cdd..aa2227a 100644 (file)
@@ -119,12 +119,12 @@ xprt_rdma_bc_allocate(struct rpc_task *task)
                return -EINVAL;
        }
 
-       page = alloc_page(RPCRDMA_DEF_GFP);
+       page = alloc_page(GFP_NOIO | __GFP_NOWARN);
        if (!page)
                return -ENOMEM;
        rqst->rq_buffer = page_address(page);
 
-       rqst->rq_rbuffer = kmalloc(rqst->rq_rcvsize, RPCRDMA_DEF_GFP);
+       rqst->rq_rbuffer = kmalloc(rqst->rq_rcvsize, GFP_NOIO | __GFP_NOWARN);
        if (!rqst->rq_rbuffer) {
                put_page(page);
                return -ENOMEM;
index c79f92e..84b685c 100644 (file)
@@ -149,8 +149,6 @@ static inline void *rdmab_data(const struct rpcrdma_regbuf *rb)
        return rb->rg_data;
 }
 
-#define RPCRDMA_DEF_GFP                (GFP_NOIO | __GFP_NOWARN)
-
 /* To ensure a transport can always make forward progress,
  * the number of RDMA segments allowed in header chunk lists
  * is capped at 16. This prevents less-capable devices from