LICENSE MIT
short circuit on-going offline volume checks once a shutdown has begun.
cm_bkgRequest_t *cm_bkgListp; /* first elt in the list of requests */
cm_bkgRequest_t *cm_bkgListEndp; /* last elt in the list of requests */
-static int daemon_ShutdownFlag = 0;
+int daemon_ShutdownFlag = 0;
static int cm_nDaemons = 0;
static time_t lastIPAddrChange = 0;
{
cm_volume_t *volp;
afs_int32 refCount;
+ extern int daemon_ShutdownFlag;
lock_ObtainRead(&cm_volumeLock);
- for (volp = cm_data.allVolumesp; volp; volp=volp->allNextp) {
+ for (volp = cm_data.allVolumesp; volp && !daemon_ShutdownFlag; volp=volp->allNextp) {
if (volp->flags & CM_VOLUMEFLAG_IN_HASH) {
InterlockedIncrement(&volp->refCount);
lock_ReleaseRead(&cm_volumeLock);