summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2020-10-22 22:57:21 +0800
committerGao Xiang <hsiangkao@redhat.com>2020-11-04 09:15:48 +0800
commita30573b3cdc77b8533d004ece1ea7c0146b437a0 (patch)
tree684ef7dce9e2ab0e1eeba136bc8e2266e38827a8 /fs/erofs
parentd3938ee23e97bfcac2e0eb6b356875da73d700df (diff)
erofs: fix setting up pcluster for temporary pages
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. [ Update: Vladimir reported the kernel log becomes polluted because PAGE_FLAGS_CHECK_AT_FREE flag(s) set if the page allocation debug option is enabled. ] Link: https://lore.kernel.org/r/20201022145724.27284-1-hsiangkao@aol.com Fixes: 5ddcee1f3a1c ("erofs: get rid of __stagingpage_alloc helper") Cc: <stable@vger.kernel.org> # 5.5+ Tested-by: Vladimir Zapolskiy <vladimir@tuxera.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/zdata.c7
1 files 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 @@ out_allocpage:
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;
}