diff --git a/src/afs/afs_osidnlc.c b/src/afs/afs_osidnlc.c index 880702d74e..d8fea44313 100644 --- a/src/afs/afs_osidnlc.c +++ b/src/afs/afs_osidnlc.c @@ -61,14 +61,6 @@ int dnlct; #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) { @@ -207,18 +199,12 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype) 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); @@ -242,7 +228,6 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype) ReleaseReadLock(&afs_xdnlc); ReleaseReadLock(&afs_xvcache); osi_dnlc_purge(); - ma_critical_exit(); return (0); } } @@ -263,7 +248,6 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype) ReleaseReadLock(&afs_xvcache); dnlcstats.misses++; osi_dnlc_remove(adp, aname, tvc); - ma_critical_exit(); return 0; } #if defined(AFS_DARWIN80_ENV) @@ -272,7 +256,6 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype) ReleaseReadLock(&afs_xvcache); dnlcstats.misses++; osi_dnlc_remove(adp, aname, tvc); - ma_critical_exit(); return 0; } if (vnode_ref(tvp)) { @@ -282,17 +265,9 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype) 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 @@ -329,7 +304,6 @@ osi_dnlc_lookup(struct vcache *adp, char *aname, int locktype) #endif } - ma_critical_exit(); return tvc; }