namei-dec-drop-lock-20060612

FIXES 17638

unsure why yet, or even if, but this is all that makes sense
This commit is contained in:
Derrick Brashear 2006-06-13 00:58:33 +00:00
parent 40b690803a
commit 1e5f6a17fc

View File

@ -695,16 +695,24 @@ namei_dec(IHandle_t * ih, Inode ino, int p1)
FDH_REALLYCLOSE(fdP);
return -1;
}
} else {
IHandle_t *th;
IH_INIT(th, ih->ih_dev, ih->ih_vid, ino);
Log("Warning: Lost ref on ihandle dev %d vid %d ino %lld\n",
th->ih_dev, th->ih_vid, (int64_t) th->ih_ino);
IH_RELEASE(th);
/* If we're less than 0, someone presumably unlinked;
don't bother setting count to 0, but we need to drop a lock */
if (namei_SetLinkCount(fdP, ino, 0, 1) < 0) {
FDH_REALLYCLOSE(fdP);
return -1;
}
}
if (count == 0) {
IHandle_t *th;
IH_INIT(th, ih->ih_dev, ih->ih_vid, ino);
#if 0
/* This triggers in the fileserver on the volume index vnodes */
if (th->ih_refcnt > 1)
Log("Warning: Leaked ref on ihandle dev %d vid %d ino %lld\n",
th->ih_dev, th->ih_vid, (int64_t) th->ih_ino);
#endif
namei_HandleToName(&name, th);
IH_RELEASE(th);
code = unlink(name.n_path);