diff options
author | Pankaj Raghav <[email protected]> | 2024-08-22 15:50:14 +0200 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2024-09-02 16:19:43 +0200 |
commit | 10553a91652d995274da63fc317470f703765081 (patch) | |
tree | de537e1c09236a5292bdf54798de02c3e7a12fd3 /lib/crypto/mpi/mpiutil.c | |
parent | 743a2753a02e805347969f6f89f38b736850d808 (diff) |
iomap: fix iomap_dio_zero() for fs bs > system page size
iomap_dio_zero() will pad a fs block with zeroes if the direct IO size
< fs block size. iomap_dio_zero() has an implicit assumption that fs block
size < page_size. This is true for most filesystems at the moment.
If the block size > page size, this will send the contents of the page
next to zero page(as len > PAGE_SIZE) to the underlying block device,
causing FS corruption.
iomap is a generic infrastructure and it should not make any assumptions
about the fs block size and the page size of the system.
Signed-off-by: Pankaj Raghav <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Reviewed-by: Daniel Gomez <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions