Skip to content

Commit ff6c82a

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Use a folio in f2fs_compress_write_end()
This removes an access of page->index. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent a909c17 commit ff6c82a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/compress.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,8 @@ bool f2fs_compress_write_end(struct inode *inode, void *fsdata,
11971197
.cluster_size = F2FS_I(inode)->i_cluster_size,
11981198
.rpages = fsdata,
11991199
};
1200-
bool first_index = (index == cc.rpages[0]->index);
1200+
struct folio *folio = page_folio(cc.rpages[0]);
1201+
bool first_index = (index == folio->index);
12011202

12021203
if (copied)
12031204
set_cluster_dirty(&cc);

0 commit comments

Comments
 (0)