Skip to content

Commit

Permalink
Linux: fix zfs_uio_dio_check_for_zero_page
Browse files Browse the repository at this point in the history
The intent here is to replace the zero page pointer in the array of
pointers to pages in the struct.

Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Pavel Snajdr <[email protected]>
Closes openzfs#16812 
Closes openzfs#16689
Closes openzfs#16642
  • Loading branch information
snajpa authored and lundman committed Jan 22, 2025
1 parent 3cd9fde commit 3f29f14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/os/linux/zfs/zfs_uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,9 @@ zfs_uio_dio_check_for_zero_page(zfs_uio_t *uio)
unlock_page(p);
put_page(p);

p = __page_cache_alloc(gfp_zero_page);
zfs_mark_page(p);
uio->uio_dio.pages[i] =
__page_cache_alloc(gfp_zero_page);
zfs_mark_page(uio->uio_dio.pages[i]);
} else {
unlock_page(p);
}
Expand Down

0 comments on commit 3f29f14

Please sign in to comment.