HomeFreeBSD

simplify path handling in sysctl_try_reclaim_vnode

Description

simplify path handling in sysctl_try_reclaim_vnode

MAXPATHLEN / PATH_MAX includes space for the terminating NUL, and namei
verifies the presence of the NUL. Thus there is no need to increase the
buffer size here.

The sysctl passes the string excluding the NUL, so req->newlen equal to
PATH_MAX is too long.

Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21876

Details

Provenance
emasteAuthored on
Reviewer
kib
Differential Revision
D21876: simplify path handling in sysctl_try_reclaim_vnode
Parents
rS353020: nvdimm: Fix error path mis-free
Branches
Unknown
Tags
Unknown