From patchwork Mon Dec 12 18:15:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Shishkin X-Patchwork-Id: 9471011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 61E5660476 for ; Mon, 12 Dec 2016 18:18:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5384A27F8C for ; Mon, 12 Dec 2016 18:18:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4823A27F85; Mon, 12 Dec 2016 18:18:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C99BE27F85 for ; Mon, 12 Dec 2016 18:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752338AbcLLSSb (ORCPT ); Mon, 12 Dec 2016 13:18:31 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33537 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752203AbcLLSSa (ORCPT ); Mon, 12 Dec 2016 13:18:30 -0500 Received: by mail-wm0-f66.google.com with SMTP id u144so12937512wmu.0 for ; Mon, 12 Dec 2016 10:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zc2/jsPHuAqRZzUEt5DQvBbytSBwgOhacHpOA3TFcXU=; b=oQSqHzAIt2rxWN6oZILwIev4+49VowRpXG8evwki3oiG/rfUszr07yRySBOWVxB0Fd WVKTjI9m08JqU2ts3vN7xS+1jx1+p7u7U1Ce0+s0ONHBHp9lx49muyE7Hr2cFnx/G2hq JO5XbL3SuM3h3BFp9OxH1wz9jMdBn76ci2ZC5vBHZyohyEJ1mrhxAP2kgRf+3C29ny8+ MHOShxTOunj71bIskg7Ib03i68YCMHm5yju2vCns5m5IZg5g3xEBBbv0WmN2vfh9xlAy 2aaY3Osy+KRzG+ucrOYBgoSJDF1G1vuCimGtkiPg6vl0ltrd1JDEGFYxRrOJZs0T/dAU LLlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zc2/jsPHuAqRZzUEt5DQvBbytSBwgOhacHpOA3TFcXU=; b=blKDdMT5Su8S2T0gAij+lZjvLWVBaJnT7bIOaIYoUS6GD3fPPXptvHnZ0t7rh+7Xk6 mqy1oT88IibD9e/d4PERjAfWh1lLdXxCp12+emLE3fh5p9kaV+yStR1waQqRtspusH8X RlT5vFUq4+dcEiaoeCWuA6BZV0fQh4oAX6BX28b1Zxs+XPFZA8L3+2hCujx5OHYa8uqV t285z9KIF49xvlGgHOKQwHCbq2R4pBKPf+0FyLWYJBzhwGy/i5XR0ht4MhpGCQDqiWWz N33FcvwgMrQiNONMc+n/+lIKys+eR483zpP3/9OxGwNQ8RFraP/6XKXL7pIctoPx9+PA DQww== X-Gm-Message-State: AKaTC01B3SdxKc9ClSL7p5/Foki89c3zPAo0vEXgRMLuzWr+j2prGzPb6j+peSpZC7tCQQ== X-Received: by 10.28.0.13 with SMTP id 13mr20043305wma.126.1481566708505; Mon, 12 Dec 2016 10:18:28 -0800 (PST) Received: from zeta.huawei.com (h-213.61.75.66.host.de.colt.net. [213.61.75.66]) by smtp.gmail.com with ESMTPSA id kp5sm58432667wjb.8.2016.12.12.10.18.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Dec 2016 10:18:28 -0800 (PST) From: edward.shishkin@gmail.com To: Eric Van Hensbergen , V9FS Developers Mailing List , Linux Filesystem Development List Cc: QEMU Developers Mailing List , ZhangWei , Claudio Fontana , Greg Kurz , Alexander Graf , Eduard Shishkin Subject: [PATCH 6/7] 9p: v9fs fix readpages writepages contexts allocation Date: Mon, 12 Dec 2016 19:15:41 +0100 Message-Id: <1481566542-25894-6-git-send-email-edward.shishkin@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481566542-25894-1-git-send-email-edward.shishkin@gmail.com> References: <1481566542-25894-1-git-send-email-edward.shishkin@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eduard Shishkin Use GFP_KERNEL instead of GFP_USER when allocating buffers for readpages/writepages contexts. Signed-off-by: Eduard Shishkin --- 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;