HomeFreeBSD

zfs_rezget: drop cached pages before doing anything else

Description

zfs_rezget: drop cached pages before doing anything else

We did that in the case of success to prevent the use of stale cached
data, but it makes even less sense to keep the cached data when we fail.

Ideally, we should call vgone() on the vnode in the case of zfs_rezget
failure, but the current lock order prevents us from doing that.

The change also rearranges the order of unlinked check and the size
change check.

While there, add missing SET_ERROR in one of the error paths.

MFC after: 2 weeks

Details

Provenance
avgAuthored on
Parents
rS328625: IBRS support, AKA Spectre hardware mitigation.
Branches
Unknown
Tags
Unknown