HomeFreeBSD

vfs: prevent numvnodes and freevnodes re-reads when appropriate

Description

vfs: prevent numvnodes and freevnodes re-reads when appropriate

Otherwise in code like this:
if (numvnodes > desiredvnodes)
vnlru_free_locked(numvnodes - desiredvnodes, NULL);

numvnodes can drop below desiredvnodes prior to the call and if the
compiler generated another read the subtraction would get a negative
value.

Details

Provenance
mjgAuthored on
Parents
rS356434: fsck_msdosfs.8: document -M.
Branches
Unknown
Tags
Unknown