HomeFreeBSD

nfs server: improve use of the VFS KPI

Description

nfs server: improve use of the VFS KPI

In particular, do not assume that vn_start_write() returns the same mp
as it was passed in, or never returns error.

Also be more accurate to return NULL vp and mp when error occured, to
catch wrong control flow easier.

Stop checking for NULL mp before calling vn_finished_write(), NULL mp
is handled transparently by the function.

Reviewed by: rmacklem
Tested by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27881

Details

Provenance
kibAuthored on Jan 1 2021, 3:35 PM
Reviewer
rmacklem
Differential Revision
D27881: nfs server: improve use if the VFS KPI
Parents
rG8c45fe5d8ecd: bootparamd: Add missing __unused mark.
Branches
Unknown
Tags
Unknown