...and also when vmm is disabled for a jail.
This revision builds off https://reviews.freebsd.org/D31156.
cyril_freebsdfoundation.org on Mon, Jul 19, 11:24 PM.Authored by
I'm not thrilled at the redundant call to vfs_flagopt(), which shouldn't be necessary because kern_jail_set has already looked for allow.novmm and set the permission bit accordingly. But by the time vmmdev_prison_set() is called, the old value of the permission bit is forgotten. So you're left with
Since all this happens only when jail_set(2) is called, which is hardly ever, there's no performance issue, and I guess it just comes down to what makes the code more readable (definitely not the third choice).
Just thinking out loud - I imagine you've already considered the options yourself and settled on what looked best.