UPSTREAM: f2fs: Use a folio in f2fs_all_cluster_page_ready()
Remove references to page->index and use folio_test_uptodate() instead of PageUptodate(). Change-Id: I165ae1d58de02eabe43e2ef60e0fec718391179e Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> (cherry picked from commit a909c179535383dc72a8f8e155ed3d35f298af86)
This commit is contained in:
committed by
Jaegeuk Kim
parent
0ea74b01b7
commit
42766772df
+5
-3
@@ -846,7 +846,7 @@ bool f2fs_cluster_can_merge_page(struct compress_ctx *cc, pgoff_t index)
|
||||
bool f2fs_all_cluster_page_ready(struct compress_ctx *cc, struct page **pages,
|
||||
int index, int nr_pages, bool uptodate)
|
||||
{
|
||||
unsigned long pgidx = pages[index]->index;
|
||||
unsigned long pgidx = page_folio(pages[index])->index;
|
||||
int i = uptodate ? 0 : 1;
|
||||
|
||||
/*
|
||||
@@ -860,9 +860,11 @@ bool f2fs_all_cluster_page_ready(struct compress_ctx *cc, struct page **pages,
|
||||
return false;
|
||||
|
||||
for (; i < cc->cluster_size; i++) {
|
||||
if (pages[index + i]->index != pgidx + i)
|
||||
struct folio *folio = page_folio(pages[index + i]);
|
||||
|
||||
if (folio->index != pgidx + i)
|
||||
return false;
|
||||
if (uptodate && !PageUptodate(pages[index + i]))
|
||||
if (uptodate && !folio_test_uptodate(folio))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user