Date: Sat, 12 Mar 2016 09:05:43 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296717 - head/sys/kern Message-ID: <201603120905.u2C95hIC082787@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Sat Mar 12 09:05:43 2016 New Revision: 296717 URL: https://svnweb.freebsd.org/changeset/base/296717 Log: Refactor the way we restore cn_lkflags; no functional changes. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sat Mar 12 08:50:38 2016 (r296716) +++ head/sys/kern/vfs_lookup.c Sat Mar 12 09:05:43 2016 (r296717) @@ -726,8 +726,9 @@ unionlookup: lkflags_save = cnp->cn_lkflags; cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags, cnp->cn_flags); - if ((error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp)) != 0) { - cnp->cn_lkflags = lkflags_save; + error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp); + cnp->cn_lkflags = lkflags_save; + if (error != 0) { KASSERT(ndp->ni_vp == NULL, ("leaf should be empty")); #ifdef NAMEI_DIAGNOSTIC printf("not found\n"); @@ -783,8 +784,7 @@ unionlookup: VREF(ndp->ni_startdir); } goto success; - } else - cnp->cn_lkflags = lkflags_save; + } good: #ifdef NAMEI_DIAGNOSTIC
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603120905.u2C95hIC082787>