qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 6/7] 9p: v9fs fix readpages writepages contexts allo


From: edward . shishkin
Subject: [Qemu-devel] [PATCH 6/7] 9p: v9fs fix readpages writepages contexts allocation
Date: Mon, 12 Dec 2016 19:15:41 +0100

From: Eduard Shishkin <address@hidden>

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

Signed-off-by: Eduard Shishkin <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]