qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: edward.shishkin@gmail.com
To: Eric Van Hensbergen <ericvh@gmail.com>,
	V9FS Developers Mailing List
	<v9fs-developer@lists.sourceforge.net>,
	Linux Filesystem Development List <linux-fsdevel@vger.kernel.org>
Cc: QEMU Developers Mailing List <qemu-devel@nongnu.org>,
	ZhangWei <zhangwei555@huawei.com>,
	Claudio Fontana <Claudio.Fontana@huawei.com>,
	Greg Kurz <groug@kaod.org>, Alexander Graf <agraf@suse.de>,
	Eduard Shishkin <eduard.shishkin@huawei.com>
Subject: [Qemu-devel] [PATCH 6/7] 9p: v9fs fix readpages writepages contexts allocation
Date: Mon, 12 Dec 2016 19:15:41 +0100	[thread overview]
Message-ID: <1481566542-25894-6-git-send-email-edward.shishkin@gmail.com> (raw)
In-Reply-To: <1481566542-25894-1-git-send-email-edward.shishkin@gmail.com>

From: Eduard Shishkin <eduard.shishkin@huawei.com>

Use GFP_KERNEL instead of GFP_USER when allocating buffers for
readpages/writepages contexts.

Signed-off-by: Eduard Shishkin <eduard.shishkin@huawei.com>
---
 fs/9p/v9fs.c     | 2 +-
 fs/9p/vfs_addr.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index e2f84a6..58bff9e 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -340,7 +340,7 @@ int alloc_init_flush_set(struct v9fs_session_info *v9ses)
 	fset->pages = kzalloc(num_pages * sizeof(*fset->pages), GFP_KERNEL);
 	if (!fset->pages)
 		goto error;
-	fset->buf = kzalloc(num_pages << PAGE_SHIFT, GFP_USER);
+	fset->buf = kzalloc(num_pages << PAGE_SHIFT, GFP_KERNEL);
 	if (!fset->buf)
 		goto error;
 	spin_lock_init(&(fset->lock));
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index afd8a13..4b2b1d6 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -119,7 +119,7 @@ static int init_readpages_ctx(struct v9fs_readpages_ctx *ctx,
 			      int num_pages)
 {
 	memset(ctx, 0, sizeof(*ctx));
-	ctx->buf = kmalloc(num_pages << PAGE_SHIFT, GFP_USER);
+	ctx->buf = kmalloc(num_pages << PAGE_SHIFT, GFP_KERNEL);
 	if (!ctx->buf)
 		return -ENOMEM;
 	ctx->filp = filp;
-- 
2.7.4

  parent reply	other threads:[~2016-12-12 18:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 17:24 [Qemu-devel] [RFC][PATCH 0/2] 9p: v9fs read and write speedup Edward Shishkin
2016-10-10 17:24 ` [Qemu-devel] [PATCH 1/2] 9p: v9fs add writepages Edward Shishkin
2016-10-10 17:24   ` [Qemu-devel] [PATCH 2/2] 9p: v9fs new readpages Edward Shishkin
2016-10-25 14:13     ` Alexander Graf
2016-12-09 18:42       ` Edward Shishkin
2016-10-25 14:01   ` [Qemu-devel] [PATCH 1/2] 9p: v9fs add writepages Alexander Graf
2016-12-09 18:43     ` Edward Shishkin
2016-12-12 18:13 ` [Qemu-devel] [RFC][PATCH 0/7] 9p: v9fs read and write speedup - V2 Edward Shishkin
2016-12-12 18:15   ` [Qemu-devel] [PATCH 1/7] 9p: v9fs add writepages edward.shishkin
2016-12-12 18:15     ` [Qemu-devel] [PATCH 2/7] 9p: v9fs new readpages edward.shishkin
2016-12-12 18:15     ` [Qemu-devel] [PATCH 3/7] 9p: v9fs fix ifnullfree.cocci warnings edward.shishkin
2016-12-12 18:15     ` [Qemu-devel] [PATCH 4/7] 9p: v9fs fix odd_ptr_err.cocci warnings edward.shishkin
2016-12-12 18:15     ` [Qemu-devel] [PATCH 5/7] 9p: v9fs fix semicolon.cocci warnings edward.shishkin
2016-12-12 18:15     ` edward.shishkin [this message]
2016-12-12 18:15     ` [Qemu-devel] [PATCH 7/7] 9p: v9fs fix calculation of max number of merged pages edward.shishkin

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=1481566542-25894-6-git-send-email-edward.shishkin@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=Claudio.Fontana@huawei.com \
    --cc=agraf@suse.de \
    --cc=eduard.shishkin@huawei.com \
    --cc=ericvh@gmail.com \
    --cc=groug@kaod.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    --cc=zhangwei555@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).