]> Gentwo Git Trees - linux/.git/commit
iomap: helper to trim pos/bytes to within folio
authorBrian Foster <bfoster@redhat.com>
Tue, 6 May 2025 13:41:16 +0000 (09:41 -0400)
committerChristian Brauner <brauner@kernel.org>
Fri, 9 May 2025 10:35:30 +0000 (12:35 +0200)
commitc4f9a1ba747dbf3b090948b528e0b408d4117137
treee7a430798aea080667ef6d2ece327d7ef5fe0a5d
parent3ceb65b17676fd10e9347b665e1c1c8cfafdcd10
iomap: helper to trim pos/bytes to within folio

Several buffered write based iteration callbacks duplicate logic to
trim the current pos and length to within the current folio. Factor
this into a helper to make it easier to relocate closer to folio
lookup.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Link: https://lore.kernel.org/20250506134118.911396-5-bfoster@redhat.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c