summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-03-21 13:20:16 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-03-22 15:52:55 -0400
commitb2648015d4521de21ed3c9f48f718e023860b8c1 (patch)
tree4db55ad16bcc7d9dab2670bf0743a7b664a49de0 /net/sunrpc/xprt.c
parent059ee82b6462028ebace435bc94f5b082be0632a (diff)
downloadlinux-stable-b2648015d4521de21ed3c9f48f718e023860b8c1.tar.gz
linux-stable-b2648015d4521de21ed3c9f48f718e023860b8c1.tar.bz2
linux-stable-b2648015d4521de21ed3c9f48f718e023860b8c1.zip
SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent
Make sure that rpciod and xprtiod are always using the same slab allocation modes. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index bbe913121f43..744c6c1d536f 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1679,15 +1679,12 @@ out:
static struct rpc_rqst *xprt_dynamic_alloc_slot(struct rpc_xprt *xprt)
{
struct rpc_rqst *req = ERR_PTR(-EAGAIN);
- gfp_t gfp_mask = GFP_KERNEL;
if (xprt->num_reqs >= xprt->max_reqs)
goto out;
++xprt->num_reqs;
spin_unlock(&xprt->reserve_lock);
- if (current->flags & PF_WQ_WORKER)
- gfp_mask |= __GFP_NORETRY | __GFP_NOWARN;
- req = kzalloc(sizeof(*req), gfp_mask);
+ req = kzalloc(sizeof(*req), rpc_task_gfp_mask());
spin_lock(&xprt->reserve_lock);
if (req != NULL)
goto out;