Linux: fix zfs_uio_dio_check_for_zero_page

The intent here is to replace the zero page pointer in the array of
pointers to pages in the struct.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Closes #16812 
Closes #16689
Closes #16642
This commit is contained in:
Pavel Snajdr
2024-12-03 01:25:35 +01:00
committed by GitHub
parent f29dcc25c7
commit c8a326aab7
+3 -2
View File
@@ -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);
}