#define dnlcHash(ts, hval) for (hval=0; *ts; ts++) { hval *= 173; hval += *ts; }
-#if defined(AFS_FBSD80_ENV) && !defined(UKERNEL)
-#define ma_critical_enter critical_enter
-#define ma_critical_exit critical_exit
-#else
-#define ma_critical_enter() {}
-#define ma_critical_exit() {}
-#endif
-
static struct nc *
GetMeAnEntry(void)
{
vnode_t tvp;
#endif
- ma_critical_enter();
-
- if (!afs_usednlc) {
- ma_critical_exit();
+ if (!afs_usednlc)
return 0;
- }
dnlcHash(ts, key); /* leaves ts pointing at the NULL */
- if (ts - aname >= AFSNCNAMESIZE) {
- ma_critical_exit();
+ if (ts - aname >= AFSNCNAMESIZE)
return 0;
- }
skey = key & (NHSIZE - 1);
TRACE(osi_dnlc_lookupT, skey);
ReleaseReadLock(&afs_xdnlc);
ReleaseReadLock(&afs_xvcache);
osi_dnlc_purge();
- ma_critical_exit();
return (0);
}
}
ReleaseReadLock(&afs_xvcache);
dnlcstats.misses++;
osi_dnlc_remove(adp, aname, tvc);
- ma_critical_exit();
return 0;
}
#if defined(AFS_DARWIN80_ENV)
ReleaseReadLock(&afs_xvcache);
dnlcstats.misses++;
osi_dnlc_remove(adp, aname, tvc);
- ma_critical_exit();
return 0;
}
if (vnode_ref(tvp)) {
AFS_GLOCK();
dnlcstats.misses++;
osi_dnlc_remove(adp, aname, tvc);
- ma_critical_exit();
return 0;
}
-#elif defined(AFS_FBSD_ENV)
- /* can't sleep in a critical section */
- ma_critical_exit();
osi_vnhold(tvc, 0);
- ma_critical_enter();
-#else
- osi_vnhold(tvc, 0);
-#endif
ReleaseReadLock(&afs_xvcache);
#ifdef notdef
#endif
}
- ma_critical_exit();
return tvc;
}