Skip to content

Commit 4fcafa3

Browse files
Matthew Wilcox (Oracle)brauner
authored andcommitted
f2fs: Use folio_next_pos()
This is one instruction more efficient than open-coding folio_pos() + folio_size(). It's the equivalent of (x + y) << z rather than x << z + y << z. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://patch.msgid.link/20251024170822.1427218-6-willy@infradead.org Reviewed-by: Chao Yu <chao@kernel.org> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Cc: Chao Yu <chao@kernel.org> Cc: linux-f2fs-devel@lists.sourceforge.net Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 4db47b2 commit 4fcafa3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/f2fs/compress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
13291329
}
13301330

13311331
folio = page_folio(cc->rpages[last_index]);
1332-
psize = folio_pos(folio) + folio_size(folio);
1332+
psize = folio_next_pos(folio);
13331333

13341334
err = f2fs_get_node_info(fio.sbi, dn.nid, &ni, false);
13351335
if (err)

0 commit comments

Comments
 (0)