HomeFreeBSD

vnet: make VNET_FOREACH() always be a loop

Description

vnet: make VNET_FOREACH() always be a loop

VNET_FOREACH() is a LIST_FOREACH if VIMAGE is set, but empty if it's
not. This means that users of the macro couldn't use 'continue' or
'break' as one would expect of a loop.

Change VNET_FOREACH() to be a loop in all cases (although one that is
fixed to one iteration if VIMAGE is not set).

Reviewed by: karels, melifaro, glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35739

Details

Provenance
kpAuthored on Jul 6 2022, 9:13 AM
Reviewer
karels
Differential Revision
D35739: vnet: make VNET_FOREACH() always be a loop
Parents
rGa526ec4351a0: stress2: Added a mount(8) test scenario
Branches
Unknown
Tags
Unknown