Page MenuHomeFreeBSD

vfs: eliminate v_tag from struct vnode

Authored by mjg on Jan 5 2020, 4:58 AM.



The only consumer uses it in a bogus manner, replace the use with an equivalent bogosity which does not require the field.

This also means getnewvnode takes the argument unnecessarily. I'll make a sweep to remove it later.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mjg created this revision.Jan 5 2020, 4:58 AM
mjg edited the summary of this revision. (Show Details)Jan 5 2020, 5:01 AM
jeff accepted this revision.Jan 6 2020, 8:17 PM
This revision is now accepted and ready to land.Jan 6 2020, 8:17 PM
This revision was automatically updated to reflect the committed changes.
kib added inline comments.Jan 7 2020, 1:18 PM

What you can do is (struct vnode *)(vp->v_object->handle) for object != NULL && object->type == OBJT_VNODE. The only case that would be not handled by this expression is nullfs mount over tmpfs.