Skip to content

Commit

Permalink
svcrdma: Remove last two __GFP_NOFAIL call sites
Browse files Browse the repository at this point in the history
Clean up.

These functions can otherwise fail, so check for page allocation
failures too.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-by: Bruce Fields <bfields@fieldses.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Chuck Lever authored and Doug Ledford committed Jan 19, 2016
1 parent 39b09a1 commit 78da2b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion net/sunrpc/xprtrdma/svc_rdma_sendto.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,10 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
inline_bytes = rqstp->rq_res.len;

/* Create the RDMA response header */
res_page = alloc_page(GFP_KERNEL | __GFP_NOFAIL);
ret = -ENOMEM;
res_page = alloc_page(GFP_KERNEL);
if (!res_page)
goto err0;
rdma_resp = page_address(res_page);
reply_ary = svc_rdma_get_reply_array(rdma_argp);
if (reply_ary)
Expand Down
4 changes: 3 additions & 1 deletion net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,9 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
int length;
int ret;

p = alloc_page(GFP_KERNEL | __GFP_NOFAIL);
p = alloc_page(GFP_KERNEL);
if (!p)
return;
va = page_address(p);

/* XDR encode error */
Expand Down

0 comments on commit 78da2b3

Please sign in to comment.