From 10f8d509df3a69e6dc684cfd81b5809adc5c9b09 Mon Sep 17 00:00:00 2001 From: Chaskiel M Grundman Date: Thu, 2 Mar 2006 06:21:42 +0000 Subject: [PATCH] remunlink-needs-iocount-20060302 FIXES 27493 keep needed iocount for remunlink on darwin 8.0 --- src/afs/VNOPS/afs_vnop_remove.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/afs/VNOPS/afs_vnop_remove.c b/src/afs/VNOPS/afs_vnop_remove.c index dfb7d32d50..1f46df6d75 100644 --- a/src/afs/VNOPS/afs_vnop_remove.c +++ b/src/afs/VNOPS/afs_vnop_remove.c @@ -438,6 +438,12 @@ afs_remunlink(register struct vcache *avc, register int doit) if (NBObtainWriteLock(&avc->lock, 423)) return 0; +#if defined(AFS_DARWIN80_ENV) + if (vnode_get(AFSTOV(avc))) { + ReleaseWriteLock(&avc->lock); + return 0; + } +#endif if (avc->mvid && (doit || (avc->states & CUnlinkedDel))) { if ((code = afs_InitReq(&treq, avc->uncred))) { @@ -487,6 +493,9 @@ afs_remunlink(register struct vcache *avc, register int doit) crfree(cred); } } else { +#if defined(AFS_DARWIN80_ENV) + vnode_put(AFSTOV(avc)); +#endif ReleaseWriteLock(&avc->lock); }