]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC: r276193
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 31 Dec 2014 01:34:37 +0000 (01:34 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 31 Dec 2014 01:34:37 +0000 (01:34 +0000)
commitdeef87cf171b71d07da2462151e415b169293d68
treecbe806da2bbcbffb7380057801e2d264a9a845aa
parent9a372c7dacf750cd5f9cce485be125ad20966088
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/9@276441 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsserver/nfs_nfsdport.c
sys/fs/nfsserver/nfs_nfsdstate.c