vfs: let the compiler catch unhandled vgetstate values in vget_abort

This commit is contained in:
Mateusz Guzik
2025-09-24 08:52:28 +00:00
parent 185c2c3dab
commit 21d42c8d90
+12 -3
View File
@@ -3352,13 +3352,22 @@ vget_abort(struct vnode *vp, enum vgetstate vs)
switch (vs) {
case VGET_USECOUNT:
vrele(vp);
break;
goto out_ok;
case VGET_HOLDCNT:
vdrop(vp);
goto out_ok;
case VGET_NONE:
break;
default:
__assert_unreachable();
}
__assert_unreachable();
/*
* This is a goto label should the cases above have more in common than
* just the 'return' statement.
*/
out_ok:
return;
}
int