提交 c4a7ca77 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 127b21b8
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册