Fix some nits in zfs_getpages()
commit8dc452d90783a63b4041ad615fac21a1aae3b087
authorMark Johnston <markjdb@gmail.com>
Thu, 14 Nov 2024 22:12:57 +0000 (14 17:12 -0500)
committerGitHub <noreply@github.com>
Thu, 14 Nov 2024 22:12:57 +0000 (14 14:12 -0800)
tree82a9de470b16b7cd01a02f361b4a08bcd17493ca
parent46c4f2ce0baafe161c726a72a38573354228fe10
Fix some nits in zfs_getpages()

- If we don't want dmu_read_pages() to perform extra readahead/behind,
  pass a pointer to 0 instead of a null pointer, as dum_read_pages()
  expects rahead and rbehind to be non-null.
- Avoid unneeded iterations in a loop.

Sponsored-by: Klara, Inc.
Reported-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #16758
module/os/freebsd/zfs/zfs_vnops_os.c