]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r276193
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 31 Dec 2014 00:40:10 +0000 (00:40 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 31 Dec 2014 00:40:10 +0000 (00:40 +0000)
commitda53e57f443cbe8969b5c5b6395714bb1b6b44f1
tree32336af699aa988152b67cc30e6781bbf118df61
parente5fe9bf2802efd4e0aaa88cb1a4e0ac7bc338eea
MFC: r276193
A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
was reported via email. This was caused by a LOR between the
sleep lock used to serialize the local locking (nfsrv_locklf())
and locking the vnode. I believe this patch fixes the problem
by delaying relocking of the vnode until the sleep lock is
unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side
effect of unlocking the vnode, unlocking the vnode was moved to before
the functions that call nfsvno_advlock().
It shouldn't affect the execution of the default case where
vfs.nfsd.enable_locallocks=0.

git-svn-id: svn://svn.freebsd.org/base/stable/10@276437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsserver/nfs_nfsdport.c
sys/fs/nfsserver/nfs_nfsdstate.c