From: Trond Myklebust <trond.myklebust@primarydata.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 2/2] SUNRPC: Allow waiting on memory allocation
Date: Sat, 24 Jan 2015 19:18:47 -0500 [thread overview]
Message-ID: <1422145127-81838-2-git-send-email-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <1422145127-81838-1-git-send-email-trond.myklebust@primarydata.com>
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>
---
net/sunrpc/sched.c | 4 ++--
1 file 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)
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)
--
2.1.0
next prev parent reply other threads:[~2015-01-25 0:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-25 0:18 [PATCH 1/2] SUNRPC: Adjust rpciod workqueue parameters Trond Myklebust
2015-01-25 0:18 ` Trond Myklebust [this message]
2015-01-25 20:11 ` [PATCH 2/2] SUNRPC: Allow waiting on memory allocation Chuck Lever
2015-01-25 21:29 ` Trond Myklebust
2015-01-26 23:33 ` [PATCH 1/2] SUNRPC: Adjust rpciod workqueue parameters Shirley Ma
2015-01-27 0:34 ` Trond Myklebust
2015-01-27 2:30 ` Shirley Ma
2015-01-27 3:17 ` Trond Myklebust
2015-01-27 6:20 ` Shirley Ma
2015-01-27 6:34 ` Trond Myklebust
2015-01-27 15:09 ` Shirley Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422145127-81838-2-git-send-email-trond.myklebust@primarydata.com \
--to=trond.myklebust@primarydata.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox