remunlink-needs-iocount-20060302

FIXES 27493

keep needed iocount for remunlink on darwin 8.0
This commit is contained in:
Chaskiel M Grundman 2006-03-02 06:21:42 +00:00 committed by Derrick Brashear
parent 84a24d096c
commit 10f8d509df

View File

@ -438,6 +438,12 @@ afs_remunlink(register struct vcache *avc, register int doit)
if (NBObtainWriteLock(&avc->lock, 423)) if (NBObtainWriteLock(&avc->lock, 423))
return 0; 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 (avc->mvid && (doit || (avc->states & CUnlinkedDel))) {
if ((code = afs_InitReq(&treq, avc->uncred))) { if ((code = afs_InitReq(&treq, avc->uncred))) {
@ -487,6 +493,9 @@ afs_remunlink(register struct vcache *avc, register int doit)
crfree(cred); crfree(cred);
} }
} else { } else {
#if defined(AFS_DARWIN80_ENV)
vnode_put(AFSTOV(avc));
#endif
ReleaseWriteLock(&avc->lock); ReleaseWriteLock(&avc->lock);
} }