]> git.ipfire.org Git - thirdparty/linux.git/commit
buffer: Use folio_next_pos()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 24 Oct 2025 17:08:11 +0000 (18:08 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 31 Oct 2025 12:11:37 +0000 (13:11 +0100)
commit6870892b6437bf7bdf37ca875bf842fe1e1385df
tree3e86a1c94f630715754850127af6ccba0b2f437f
parent48f3784b17d91457586fbbc292675206f166a138
buffer: 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-4-willy@infradead.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/buffer.c