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 #16812 
Closes #16689
Closes #16642
  • Loading branch information
snajpa authored Dec 3, 2024
1 parent f29dcc2 commit c8a326a
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 c8a326a

Please sign in to comment.