From 3ae5dd8f5a44f0dd82f93ff9433a82e0528a6d7a Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 4 Apr 2005 09:36:26 +0000 Subject: - Fix union's assumptions about when the dvp is unlocked. It is only unlocked in the ISDOTDOT case now, not for all !ISLASTCN lookups. --- sys/fs/unionfs/union_vnops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/fs/unionfs/union_vnops.c') diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 04e1ba2..ae80503 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -228,15 +228,15 @@ union_lookup1(udvp, pdvp, vpp, cnp) } /* - * The parent directory will have been unlocked, unless lookup - * found the last component or if dvp == tdvp (tdvp must be locked). + * The parent directory will have been unlocked, unless this is a + * dotdot lookup or if dvp == tdvp (tdvp must be locked). * * We want our dvp to remain locked and ref'd. We also want tdvp * to remain locked and ref'd. */ UDEBUG(("parentdir %p result %p flag %lx\n", dvp, tdvp, cnp->cn_flags)); - if (dvp != tdvp && (cnp->cn_flags & ISLASTCN) == 0) + if (dvp != tdvp && (cnp->cn_flags & ISDOTDOT)) vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); /* -- cgit v1.1