kib@ suggested that recoding nfs_advlock() to avoid the many cases of
NFSVOPUNLOCK(vp, 0);
return (Exxx);
and instead have a single
NFSVOPUNLOCK(vp, 0);
return (error);
at the end would make the code more readable w.r.t. vnode locking.
This patch does that. It does not change any semantics.
(Kostik, the "svn -x -U999999" command didn't work for me. I did this diff with "-U 20" so there are more lines of context.)
Details
Details
Tested for lock behaviour using the connectathon lock tests for both NFSv3 with "nolockd" and NFSv4.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 20648
Event Timeline
Comment Actions
Thus looks fine, thank you.
While reviewing it, I noted the only and really unexplanaible use of Giant in nfs code in nfs_dolock(). Is it needed at all ? If needed, can it be replaced by some sx lock and s/tsleep/sx_xlock/ ?
Comment Actions
nfs_dolock() is the front end for the NLM stuff, which I know nothing about.
I'll try emailing dfr@ and see if he can tell me what locking is required.
(You might have noticed that I don't have much use for the NLM;-)
Thanks for the review, rick