From 5f4f1383e0706850f4d42e49fc37813cf7943539 Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Mon, 19 Nov 2012 23:32:16 +0100 Subject: [PATCH] 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 --- sys/gnu/vfs/ext2fs/ext2_lookup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/gnu/vfs/ext2fs/ext2_lookup.c b/sys/gnu/vfs/ext2fs/ext2_lookup.c index 0f69e3ed85..1dd68e1b89 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); -- 2.41.0