HomeFreeBSD

vfs cache: fix a hang when bumping vnode limit too high

Description

vfs cache: fix a hang when bumping vnode limit too high

Overflow in cache_changesize would make the value flip to 0 and stay
there as 0 << 1 does not do anything.

Note callers limit the outcome to something below u_int.

Also note there entire vnode handling thing both in vfs layer as a whole
and this file can't decide whether to long, u_long or u_int.

Approved by: re (gjb)
(cherry picked from commit 32988c1499f8698b41e15ed40a46d271e757bba3)
(cherry picked from commit 41fad6503c1e5259e65d4f14110a5decb7653b02)

Details

Provenance
mjgAuthored on Sep 2 2023, 2:27 PM
Parents
rGfb4c1757a920: drm2: whack set-but-not-used warns
Branches
Unknown
Tags
Unknown