Date: Wed, 29 May 2019 13:47:10 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r348358 - stable/12/sys/kern Message-ID: <201905291347.x4TDlAIF013139@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed May 29 13:47:10 2019 New Revision: 348358 URL: https://svnweb.freebsd.org/changeset/base/348358 Log: MFC r348052: NDFREE(): Fix unlocking for LOCKPARENT|LOCKLEAF and ndp->ni_dvp == ndp->ni_vp. Modified: stable/12/sys/kern/vfs_lookup.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_lookup.c ============================================================================== --- stable/12/sys/kern/vfs_lookup.c Wed May 29 13:33:29 2019 (r348357) +++ stable/12/sys/kern/vfs_lookup.c Wed May 29 13:47:10 2019 (r348358) @@ -1282,6 +1282,10 @@ NDFREE(struct nameidata *ndp, const u_int flags) if (!(flags & NDF_NO_VP_UNLOCK) && (ndp->ni_cnd.cn_flags & LOCKLEAF) && ndp->ni_vp) unlock_vp = 1; + if (!(flags & NDF_NO_DVP_UNLOCK) && + (ndp->ni_cnd.cn_flags & LOCKPARENT) && + ndp->ni_dvp != ndp->ni_vp) + unlock_dvp = 1; if (!(flags & NDF_NO_VP_RELE) && ndp->ni_vp) { if (unlock_vp) { vput(ndp->ni_vp); @@ -1292,10 +1296,6 @@ NDFREE(struct nameidata *ndp, const u_int flags) } if (unlock_vp) VOP_UNLOCK(ndp->ni_vp, 0); - if (!(flags & NDF_NO_DVP_UNLOCK) && - (ndp->ni_cnd.cn_flags & LOCKPARENT) && - ndp->ni_dvp != ndp->ni_vp) - unlock_dvp = 1; if (!(flags & NDF_NO_DVP_RELE) && (ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { if (unlock_dvp) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905291347.x4TDlAIF013139>