mirror of https://github.com/torvalds/linux.git
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>
This commit is contained in:
parent
4db47b2521
commit
4fcafa30b7
|
|
@ -1329,7 +1329,7 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
|
||||||
}
|
}
|
||||||
|
|
||||||
folio = page_folio(cc->rpages[last_index]);
|
folio = page_folio(cc->rpages[last_index]);
|
||||||
psize = folio_pos(folio) + folio_size(folio);
|
psize = folio_next_pos(folio);
|
||||||
|
|
||||||
err = f2fs_get_node_info(fio.sbi, dn.nid, &ni, false);
|
err = f2fs_get_node_info(fio.sbi, dn.nid, &ni, false);
|
||||||
if (err)
|
if (err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue