Date: Thu, 25 Dec 2014 14:44:05 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276200 - head/sys/kern Message-ID: <201412251444.sBPEi5Sd047532@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Thu Dec 25 14:44:04 2014 New Revision: 276200 URL: https://svnweb.freebsd.org/changeset/base/276200 Log: Fix the comment introduced in r276192 so that it clearly states that the change is needed to avoid a deadlock. Suggested by: kib MFC after: 1 week Modified: head/sys/kern/vfs_default.c Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Thu Dec 25 13:38:51 2014 (r276199) +++ head/sys/kern/vfs_default.c Thu Dec 25 14:44:04 2014 (r276200) @@ -407,9 +407,10 @@ vop_stdadvlock(struct vop_advlock_args * vp = ap->a_vp; if (ap->a_fl->l_whence == SEEK_END) { /* - * The NFSv4 server will LOR/deadlock if a vn_lock() call - * is done on vp. Fortunately, vattr.va_size is only - * needed for SEEK_END and the NFSv4 server only uses SEEK_SET. + * The NFSv4 server must avoid doing a vn_lock() here, since it + * can deadlock the nfsd threads, due to a LOR. Fortunately + * the NFSv4 server always uses SEEK_SET and this code is + * only required for the SEEK_END case. */ vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, curthread->td_ucred);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412251444.sBPEi5Sd047532>