]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm: Use folio_next_pos()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 24 Oct 2025 17:08:18 +0000 (18:08 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 31 Oct 2025 12:11:38 +0000 (13:11 +0100)
commit60a70e61430b2d568bc5e96f629c5855ee159ace
tree37851ee99a28edff992bccd57be9670b52727a85
parentac0a11113de3f0007283d20f5a38615ea4c6e9fd
mm: 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-11-willy@infradead.org
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
mm/shmem.c
mm/truncate.c