From patchwork Thu Oct 22 14:57:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gao Xiang X-Patchwork-Id: 290235 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE2DFC55179 for ; Thu, 22 Oct 2020 14:57:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4764A24641 for ; Thu, 22 Oct 2020 14:57:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=aol.com header.i=@aol.com header.b="KPVI26Pf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504821AbgJVO5s (ORCPT ); Thu, 22 Oct 2020 10:57:48 -0400 Received: from sonic305-20.consmr.mail.gq1.yahoo.com ([98.137.64.83]:44874 "EHLO sonic305-20.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505519AbgJVO5s (ORCPT ); Thu, 22 Oct 2020 10:57:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1603378667; bh=zwvCVywwXJPAfIYLckNHNuWz6WV1ugE9tkAOhdwuh+Q=; h=From:To:Cc:Subject:Date:References:From:Subject; b=KPVI26PfB2zvjqV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pCFJNHCASTO9QX9 kTWSzRvACdGcYjQaL50c8Vx8f0DaAecPusGzMNSMbGFpmd7x6lyef7xY.OsGRoXdg.MWdlwS9Mac rXzTwCKJEbh6voo9NsL6fZZAWrcOiw01l2HQlKlnnk_BEMi_ZqHmjZQqOyEAccSm_cu2.6NDxlOn 9yWAAfXq88vz7ePnu4293IsmTX7hbPX9QUajS Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Thu, 22 Oct 2020 14:57:47 +0000 Received: by smtp401.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 354b2034a70b817070abfec37b60849b; Thu, 22 Oct 2020 14:57:44 +0000 (UTC) From: Gao Xiang To: linux-erofs@lists.ozlabs.org Cc: Chao Yu , Chao Yu , LKML , Gao Xiang , stable@vger.kernel.org Subject: [PATCH 1/4] erofs: fix setting up pcluster for temporary pages Date: Thu, 22 Oct 2020 22:57:21 +0800 Message-Id: <20201022145724.27284-1-hsiangkao@aol.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 References: <20201022145724.27284-1-hsiangkao.ref@aol.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Gao Xiang pcluster should be only set up for all managed pages instead of temporary pages. Since it currently uses page->mapping to identify, the impact is minor for now. Fixes: 5ddcee1f3a1c ("erofs: get rid of __stagingpage_alloc helper") Cc: # 5.5+ Signed-off-by: Gao Xiang Tested-by: Vladimir Zapolskiy Reviewed-by: Chao Yu --- fs/erofs/zdata.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 50912a5420b4..86fd3bf62af6 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -1078,8 +1078,11 @@ static struct page *pickup_page_for_submission(struct z_erofs_pcluster *pcl, cond_resched(); goto repeat; } - set_page_private(page, (unsigned long)pcl); - SetPagePrivate(page); + + if (tocache) { + set_page_private(page, (unsigned long)pcl); + SetPagePrivate(page); + } out: /* the only exit (for tracing and debugging) */ return page; }