]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-remove-vnop-lock-order-20060110
authorDerrick Brashear <shadow@dementia.org>
Tue, 10 Jan 2006 15:04:40 +0000 (15:04 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 10 Jan 2006 15:04:40 +0000 (15:04 +0000)
FIXES 25118

finegrained dcache lock order not obeyed

(cherry picked from commit 39b23a0dc16f2e26abf3b7df53bfadb98377748d)

src/afs/VNOPS/afs_vnop_remove.c

index 92e344f0c2fceea7d7df3a191564f9913eb69037..a9de86702c3a7c0b9193e2e19e9aec902f487d3b 100644 (file)
@@ -356,7 +356,13 @@ afs_remove(OSI_VC_ARG(adp), aname, acred)
        FetchWholeEnchilada(tvc, &treq);
 #endif
        ReleaseWriteLock(&tvc->lock);
+       if (tdc) 
+           ReleaseSharedLock(&tdc->lock);
        ObtainWriteLock(&adp->lock, 144);
+       /* Technically I don't think we need this back, but let's hold it 
+          anyway; The "got" reference should actually be sufficient. */
+       if (tdc) 
+           ObtainSharedLock(&tdc->lock, 640);
     }
 
     osi_dnlc_remove(adp, aname, tvc);