From: Antonio Huete Jimenez Date: Mon, 19 Nov 2012 22:32:16 +0000 (+0100) Subject: ext2fs - Clear CNP_PDIRUNLOCK flag after a lookup. X-Git-Tag: v3.4.0rc~818 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/5f4f1383e0706850f4d42e49fc37813cf7943539 ext2fs - Clear CNP_PDIRUNLOCK flag after a lookup. vop_compat_nresolve() unlocks the vnode when flag CNP_PDIRUNLOCK is set, so either we clear the flag or avoid unlocking the vnode after an ext2_lookup(). DragonFly-bug: http://bugs.dragonflybsd.org/issues/2454 Reported by: Skylar Hawk --- diff --git a/sys/gnu/vfs/ext2fs/ext2_lookup.c b/sys/gnu/vfs/ext2fs/ext2_lookup.c index 0f69e3e..1dd68e1 100644 --- a/sys/gnu/vfs/ext2fs/ext2_lookup.c +++ b/sys/gnu/vfs/ext2fs/ext2_lookup.c @@ -658,8 +658,10 @@ found: } else { if ((error = VFS_VGET(vdp->v_mount, NULL, dp->i_ino, &tdp)) != 0) return (error); - if (!lockparent) + if (!lockparent) { vn_unlock(pdp); + cnp->cn_flags |= CNP_PDIRUNLOCK; + } *vpp = tdp; } return (0);