f2fs: Use a folio in f2fs_compress_write_end()

This removes an access of page->index.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2024-11-28 04:58:17 +00:00 committed by Jaegeuk Kim
parent a909c17953
commit ff6c82a934

View File

@ -1197,7 +1197,8 @@ bool f2fs_compress_write_end(struct inode *inode, void *fsdata,
.cluster_size = F2FS_I(inode)->i_cluster_size,
.rpages = fsdata,
};
bool first_index = (index == cc.rpages[0]->index);
struct folio *folio = page_folio(cc.rpages[0]);
bool first_index = (index == folio->index);
if (copied)
set_cluster_dirty(&cc);