afs_uint32 maxVictimPtr; /* where it is */
int discard;
int curbucket;
+ int vfslocked;
+
+#if defined(AFS_FBSD80_ENV) && !defined(UKERNEL)
+ vfslocked = VFS_LOCK_GIANT(afs_globalVFS);
+#endif
AFS_STATCNT(afs_GetDownD);
+
if (CheckLock(&afs_xdcache) != -1)
osi_Panic("getdownd nolock");
/* decrement anumber first for all dudes in free list */
* because we should try to free space even if anumber <=0 */
if (!aneedSpace || *aneedSpace <= 0) {
anumber -= afs_freeDCCount;
- if (anumber <= 0)
+ if (anumber <= 0) {
+#if defined(AFS_FBSD80_ENV) && !defined(UKERNEL)
+ VFS_UNLOCK_GIANT(vfslocked);
+#endif
return; /* enough already free */
+ }
}
+
/* bounds check parameter */
if (anumber > MAXATONCE)
anumber = MAXATONCE; /* all we can do */
break;
}
} /* big while loop */
+
+#if defined(AFS_FBSD80_ENV) && !defined(UKERNEL)
+ VFS_UNLOCK_GIANT(vfslocked);
+#endif
+
return;
} /*afs_GetDownD */