Page MenuHomeFreeBSD

Move OBJT_VNODE specific code from vm_object_terminate() to vnode_destroy_vobject().
ClosedPublic

Authored by kib on Aug 21 2019, 9:29 PM.

Details

Summary

Peter, could you, please, check this change ?

Diff Detail

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

Event Timeline

kib created this revision.Aug 21 2019, 9:29 PM
jeff added a comment.Aug 21 2019, 9:31 PM

In general I like this but the double setting of OBJ_DEAD does make it harder to detect things like double frees.

kib updated this revision to Diff 61094.Aug 21 2019, 9:44 PM

Untangle multiple OBJ_DEAD sets.

jeff accepted this revision.Aug 21 2019, 9:49 PM
This revision is now accepted and ready to land.Aug 21 2019, 9:49 PM
kib updated this revision to Diff 61095.Aug 21 2019, 9:51 PM

Redo the patch back to the initial variant. Note that there is only one place that calls vm_object_terminate_dead(), so it costs nothing to set OBJ_DEAD flag there and make vm_object_terminate() to expect OBJ_DEAD is already set.

This is cleaner IMO, since both terminate_dead and terminate really not needed.

This revision now requires review to proceed.Aug 21 2019, 9:51 PM
markj accepted this revision.Aug 21 2019, 10:14 PM
This revision is now accepted and ready to land.Aug 21 2019, 10:14 PM
kib edited the summary of this revision. (Show Details)Aug 22 2019, 8:20 AM
kib added a subscriber: pho.
alc accepted this revision.Aug 23 2019, 5:42 AM
pho added a comment.Aug 25 2019, 6:49 AM

I ran all of the stress2 tests with D21357.61095.diff on amd64. LGTM.

This revision was automatically updated to reflect the committed changes.