Page MenuHomeFreeBSD

unix: Simplify uipc_detach()
ClosedPublic

Authored by markj on Wed, Aug 5, 3:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 26, 7:46 PM
Unknown Object (File)
Tue, Aug 25, 2:30 AM
Unknown Object (File)
Thu, Aug 20, 4:48 AM
Unknown Object (File)
Thu, Aug 20, 12:42 AM
Unknown Object (File)
Thu, Aug 20, 12:22 AM
Unknown Object (File)
Tue, Aug 18, 1:39 PM
Unknown Object (File)
Tue, Aug 18, 3:10 AM
Unknown Object (File)
Mon, Aug 17, 12:48 PM

Details

Summary

uipc_close() handles detaching a unix socket from the vnode to which
it's bound, if any, so doing the same in uipc_detach() is redundant.
Moreover, it's conceptually wrong that uipc_detach() might need to
handle this: detach happens when there are no remaining references to
the socket, and that should include the vnode's reference, even though
it's not explicitly counted.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Wed, Aug 5, 3:13 PM

Very nice! Always love a mostly-red patch.

This revision is now accepted and ready to land.Wed, Aug 5, 4:04 PM

Also, do you think we've made enough cleanup/refactor PRs now that it might good to start landing them?

I ought to rebase mine on top of this for testing, I think, but I don't want to make a mess of the ones that you already approved but want to make slight changes too (per the discussion D58460, if I understand correctly).

To be fair, not VFS expert. Given that patch adds an assertion and it doesn't fire - it is correct. Thanks! :)

Also, do you think we've made enough cleanup/refactor PRs now that it might good to start landing them?

I ought to rebase mine on top of this for testing, I think, but I don't want to make a mess of the ones that you already approved but want to make slight changes too (per the discussion D58460, if I understand correctly).

I have a branch with all of the patches together (plus a couple more for some unrelated bugs I found recently) and am currently fuzzing them with syzkaller. If I don't see any problems in the next couple of days I'll go ahead and land them.

Rebasing is fine, please just make sure you update all of the patches in the series when you do so, as I'll fetch patches from phabricator in order to commit them. git arc tries to make review updates tolerably easy.

(I don't think it's actually necessary to rebase though? AFAICS your patches don't touch this function.)

Also, do you think we've made enough cleanup/refactor PRs now that it might good to start landing them?

I ought to rebase mine on top of this for testing, I think, but I don't want to make a mess of the ones that you already approved but want to make slight changes too (per the discussion D58460, if I understand correctly).

I have a branch with all of the patches together (plus a couple more for some unrelated bugs I found recently) and am currently fuzzing them with syzkaller. If I don't see any problems in the next couple of days I'll go ahead and land them.

Rebasing is fine, please just make sure you update all of the patches in the series when you do so, as I'll fetch patches from phabricator in order to commit them. git arc tries to make review updates tolerably easy.

(I don't think it's actually necessary to rebase though? AFAICS your patches don't touch this function.)

OK, that sounds good. (And sorry for continuing to split the conversation across multiple issues). I will just focus on the testing, and try to avoid rebasing anything, and just await for your branch to land. After that happens, things will be simple.

This revision was automatically updated to reflect the committed changes.