Skip to content

Commit

Permalink
erofs: fix setting up pcluster for temporary pages
Browse files Browse the repository at this point in the history
commit a30573b upstream.

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: 5ddcee1 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Gao Xiang authored and gregkh committed Nov 18, 2020
1 parent 0c8e440 commit 877c8cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/erofs/zdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,8 +1080,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;
}
Expand Down

0 comments on commit 877c8cb

Please sign in to comment.