aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 994cfea2bad..83a4c43cee7 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -812,7 +812,10 @@ static void rpc_async_schedule(struct work_struct *work)
812void *rpc_malloc(struct rpc_task *task, size_t size) 812void *rpc_malloc(struct rpc_task *task, size_t size)
813{ 813{
814 struct rpc_buffer *buf; 814 struct rpc_buffer *buf;
815 gfp_t gfp = RPC_IS_SWAPPER(task) ? GFP_ATOMIC : GFP_NOWAIT; 815 gfp_t gfp = GFP_NOWAIT;
816
817 if (RPC_IS_SWAPPER(task))
818 gfp |= __GFP_MEMALLOC;
816 819
817 size += sizeof(struct rpc_buffer); 820 size += sizeof(struct rpc_buffer);
818 if (size <= RPC_BUFFER_MAXSIZE) 821 if (size <= RPC_BUFFER_MAXSIZE)
@@ -886,7 +889,7 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta
886static struct rpc_task * 889static struct rpc_task *
887rpc_alloc_task(void) 890rpc_alloc_task(void)
888{ 891{
889 return (struct rpc_task *)mempool_alloc(rpc_task_mempool, GFP_NOFS); 892 return (struct rpc_task *)mempool_alloc(rpc_task_mempool, GFP_NOIO);
890} 893}
891 894
892/* 895/*