Skip to content

Commit c8a326a

Browse files
authored
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Closes #16812 Closes #16689 Closes #16642
1 parent f29dcc2 commit c8a326a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

module/os/linux/zfs/zfs_uio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,9 @@ zfs_uio_dio_check_for_zero_page(zfs_uio_t *uio)
546546
unlock_page(p);
547547
put_page(p);
548548

549-
p = __page_cache_alloc(gfp_zero_page);
550-
zfs_mark_page(p);
549+
uio->uio_dio.pages[i] =
550+
__page_cache_alloc(gfp_zero_page);
551+
zfs_mark_page(uio->uio_dio.pages[i]);
551552
} else {
552553
unlock_page(p);
553554
}

0 commit comments

Comments
 (0)