From e1b6efc32c724e86bf94597ea8d55abba488d8ed Mon Sep 17 00:00:00 2001 From: Alex Hornung Date: Tue, 19 Jun 2012 14:07:26 +0100 Subject: [PATCH] puffs - don't lock dvp on nresolve * locking dvp on nresolve causes a deadlock with the puffsop thread when the dvp is the root vnode. * If a lookup/nresolve occurs at the same time as a flush via the puffsop, then puffsop will not be able to acquire a lock on the root vnode as the lookup routine already holds it. Similarly the lookup routine never gets woken up waiting for the message to arrive, since puffsop is stuck and can't reply. --- sys/vfs/puffs/puffs_vnops.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/vfs/puffs/puffs_vnops.c b/sys/vfs/puffs/puffs_vnops.c index 57b1773c84..d6113f2d0d 100644 --- a/sys/vfs/puffs/puffs_vnops.c +++ b/sys/vfs/puffs/puffs_vnops.c @@ -118,12 +118,6 @@ puffs_vnop_lookup(struct vop_nresolve_args *ap) DPRINTF(("puffs_lookup: \"%s\", parent vnode %p\n", ncp->nc_name, dvp)); - if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) { - DPRINTF(("puffs_vnop_lookup: EAGAIN on ncp %p %s\n", - ncp, ncp->nc_name)); - return EAGAIN; - } - PUFFS_MSG_ALLOC(vn, lookup); puffs_makecn(&lookup_msg->pvnr_cn, &lookup_msg->pvnr_cn_cred, ncp, cred); @@ -168,7 +162,6 @@ puffs_vnop_lookup(struct vop_nresolve_args *ap) } out: - vput(dvp); if (!error && vp != NULL) { vn_unlock(vp); cache_setvp(nch, vp); -- 2.41.0