diff options
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 1f19aa15f89b..128494ec9a64 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -815,7 +815,10 @@ static void rpc_async_schedule(struct work_struct *work) | |||
815 | void *rpc_malloc(struct rpc_task *task, size_t size) | 815 | void *rpc_malloc(struct rpc_task *task, size_t size) |
816 | { | 816 | { |
817 | struct rpc_buffer *buf; | 817 | struct rpc_buffer *buf; |
818 | gfp_t gfp = RPC_IS_SWAPPER(task) ? GFP_ATOMIC : GFP_NOWAIT; | 818 | gfp_t gfp = GFP_NOWAIT; |
819 | |||
820 | if (RPC_IS_SWAPPER(task)) | ||
821 | gfp |= __GFP_MEMALLOC; | ||
819 | 822 | ||
820 | size += sizeof(struct rpc_buffer); | 823 | size += sizeof(struct rpc_buffer); |
821 | if (size <= RPC_BUFFER_MAXSIZE) | 824 | if (size <= RPC_BUFFER_MAXSIZE) |
@@ -889,7 +892,7 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta | |||
889 | static struct rpc_task * | 892 | static struct rpc_task * |
890 | rpc_alloc_task(void) | 893 | rpc_alloc_task(void) |
891 | { | 894 | { |
892 | return (struct rpc_task *)mempool_alloc(rpc_task_mempool, GFP_NOFS); | 895 | return (struct rpc_task *)mempool_alloc(rpc_task_mempool, GFP_NOIO); |
893 | } | 896 | } |
894 | 897 | ||
895 | /* | 898 | /* |