Skip to content

Commit

Permalink
SUNRPC: Allow waiting on memory allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust committed Jan 24, 2015
1 parent 127b21b commit c4a7ca7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,10 +844,10 @@ static void rpc_async_schedule(struct work_struct *work)
void *rpc_malloc(struct rpc_task *task, size_t size)
{
struct rpc_buffer *buf;
gfp_t gfp = GFP_NOWAIT | __GFP_NOWARN;
gfp_t gfp = GFP_NOIO | __GFP_NOWARN;

if (RPC_IS_SWAPPER(task))
gfp |= __GFP_MEMALLOC;
gfp = __GFP_MEMALLOC | GFP_NOWAIT | __GFP_NOWARN;

size += sizeof(struct rpc_buffer);
if (size <= RPC_BUFFER_MAXSIZE)
Expand Down

0 comments on commit c4a7ca7

Please sign in to comment.