summaryrefslogtreecommitdiff
path: root/fs/erofs/zdata.h
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2020-12-08 12:58:32 +0300
committerGao Xiang <hsiangkao@redhat.com>2020-12-08 13:08:21 +0300
commit6aaa7b0664e6886f6154070edbc24435d6e1f86b (patch)
treee071fea60039165f7eacf8b8780979811b0f80bc /fs/erofs/zdata.h
parenta426ce9d6751cc8e709f031fa546900e4239f125 (diff)
downloadlinux-6aaa7b0664e6886f6154070edbc24435d6e1f86b.tar.xz
erofs: get rid of magical Z_EROFS_MAPPING_STAGING
Previously, we played around with magical page->mapping for short-lived temporary pages since we need to identify different types of pages in the same pcluster but both invalidated and short-lived temporary pages can have page->mapping == NULL. It was considered as safe because that temporary pages are all non-LRU / non-movable pages. This patch tends to use specific page->private to identify short-lived pages instead so it won't rely on page->mapping anymore. Details are described in "compress.h" as well. Link: https://lore.kernel.org/r/20201208095834.3133565-1-hsiangkao@redhat.com Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs/zdata.h')
-rw-r--r--fs/erofs/zdata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/erofs/zdata.h b/fs/erofs/zdata.h
index 68c9b29fc0ca..b503b353d4ab 100644
--- a/fs/erofs/zdata.h
+++ b/fs/erofs/zdata.h
@@ -173,6 +173,7 @@ static inline void z_erofs_onlinepage_endio(struct page *page)
v = atomic_dec_return(u.o);
if (!(v & Z_EROFS_ONLINEPAGE_COUNT_MASK)) {
+ set_page_private(page, 0);
ClearPagePrivate(page);
if (!PageError(page))
SetPageUptodate(page);