]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: Use a folio in f2fs_compress_write_end()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 28 Nov 2024 04:58:17 +0000 (04:58 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 16 Dec 2024 16:11:58 +0000 (16:11 +0000)
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>
fs/f2fs/compress.c

index 9f8d0f4c8564c1bfc7a42880b05773cf8eed8ec2..c91a2e4fe60c3726bb796154157361eb842b7b2e 100644 (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);