openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.69k stars 1.76k forks source link

Fix some nits in zfs_getpages() #16758

Closed markjdb closed 2 weeks ago

markjdb commented 2 weeks ago

Fix a couple of bugs in zfs_getpages() pointed out in post-commit review.

Motivation and Context

This change fixes a couple of small issues with a previous recent change to zfs_getpages().

Description

See the commit log message. Note that the null pointer dereference described there will not arise in practice today, as zfs_getpages() is always called with count=1 on FreeBSD.

How Has This Been Tested?

Currently running the ZTS.

Types of changes

Checklist: