diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-01-23 14:50:56 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-01-24 18:46:50 -0500 |
commit | c4a7ca774949960064dac11b326908f28407e8c3 (patch) | |
tree | 7c014e0e1980ced7e5c350bd1d964fd58d5ab2e6 /net | |
parent | 127b21b89f9d8ba0dc23e47b8c35d8a0bac9d6fc (diff) |
SUNRPC: Allow waiting on memory allocation
We should be safe now, as long as we don't do GFP_IO or higher allocations
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 4f65ec28d2b4..b91fd9c597b4 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -844,10 +844,10 @@ static void rpc_async_schedule(struct work_struct *work) | |||
844 | void *rpc_malloc(struct rpc_task *task, size_t size) | 844 | void *rpc_malloc(struct rpc_task *task, size_t size) |
845 | { | 845 | { |
846 | struct rpc_buffer *buf; | 846 | struct rpc_buffer *buf; |
847 | gfp_t gfp = GFP_NOWAIT | __GFP_NOWARN; | 847 | gfp_t gfp = GFP_NOIO | __GFP_NOWARN; |
848 | 848 | ||
849 | if (RPC_IS_SWAPPER(task)) | 849 | if (RPC_IS_SWAPPER(task)) |
850 | gfp |= __GFP_MEMALLOC; | 850 | gfp = __GFP_MEMALLOC | GFP_NOWAIT | __GFP_NOWARN; |
851 | 851 | ||
852 | size += sizeof(struct rpc_buffer); | 852 | size += sizeof(struct rpc_buffer); |
853 | if (size <= RPC_BUFFER_MAXSIZE) | 853 | if (size <= RPC_BUFFER_MAXSIZE) |