]> Gentwo Git Trees - linux/.git/commit
iomap: use largest_zero_folio() in iomap_dio_zero()
authorPankaj Raghav <p.raghav@samsung.com>
Thu, 14 Aug 2025 14:21:37 +0000 (16:21 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 31 Oct 2025 09:12:35 +0000 (10:12 +0100)
commit10436adf9df60ae73390754b47a4bdebf728529f
tree520088c69db85495e5b207de00568d26c46db68e
parentb2c43efc3c8d9cda34eb8421249d15e6fed4d650
iomap: use largest_zero_folio() in iomap_dio_zero()

iomap_dio_zero() uses a custom allocated memory of zeroes for padding
zeroes. This was a temporary solution until there was a way to request a
zero folio that was greater than the PAGE_SIZE.

Use largest_zero_folio() function instead of using the custom allocated
memory of zeroes. There is no guarantee from largest_zero_folio()
function that it will always return a PMD sized folio. Adapt the code so
that it can also work if largest_zero_folio() returns a ZERO_PAGE.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/direct-io.c