Windows: remove unused CM_SCACHEFLAGs
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 10 Jul 2012 04:09:14 +0000 (00:09 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 11 Jul 2012 14:12:26 +0000 (07:12 -0700)
CM_SCACHEFLAG_CALLBACK and CM_SCACHEFLAG_STATD were cleared at
various points and tested at various points but never set.
Remove them.

Change-Id: I018c51febf01e1311dc38e3779e8c8880890f20a
Reviewed-on: http://gerrit.openafs.org/7751
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/cm_callback.c
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_scache.h

index d1ed5f0..dfd7a2f 100644 (file)
@@ -726,7 +726,7 @@ SRXAFSCB_GetCE(struct rx_call *callp, long index, AFSDBCacheEntry *cep)
         break;
     }
     cep->states = 0;
-    if (scp->flags & CM_SCACHEFLAG_STATD)
+    if (cm_HaveCallback(scp))
         cep->states |= 1;
     if (scp->flags & CM_SCACHEFLAG_RO || scp->flags & CM_SCACHEFLAG_PURERO)
         cep->states |= 4;
@@ -841,7 +841,7 @@ SRXAFSCB_GetCE64(struct rx_call *callp, long index, AFSDBCacheEntry64 *cep)
         break;
     }
     cep->states = 0;
-    if (scp->flags & CM_SCACHEFLAG_STATD)
+    if (cm_HaveCallback(scp))
         cep->states |= 1;
     if (scp->flags & CM_SCACHEFLAG_RO || scp->flags & CM_SCACHEFLAG_PURERO)
         cep->states |= 4;
index 61c1519..4922fd6 100644 (file)
@@ -185,8 +185,7 @@ long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
      * also initialize some flags */
     scp->fileType = 0;
     _InterlockedAnd(&scp->flags,
-                    ~(CM_SCACHEFLAG_STATD
-                    | CM_SCACHEFLAG_DELETED
+                    ~( CM_SCACHEFLAG_DELETED
                     | CM_SCACHEFLAG_RO
                     | CM_SCACHEFLAG_PURERO
                     | CM_SCACHEFLAG_OVERQUOTA
@@ -639,7 +638,6 @@ cm_ShutdownSCache(void)
         }
         scp->cbExpires = 0;
         scp->cbIssued = 0;
-        _InterlockedAnd(&scp->flags, ~CM_SCACHEFLAG_CALLBACK);
         lock_ReleaseWrite(&scp->rw);
 
 #ifdef USE_BPLUS
@@ -702,7 +700,7 @@ void cm_InitSCache(int newFile, long maxSCaches)
                 scp->dirDataVersion = CM_SCACHE_VERSION_BAD;
 #endif
                 scp->waitQueueT = NULL;
-                _InterlockedAnd(&scp->flags, ~(CM_SCACHEFLAG_CALLBACK | CM_SCACHEFLAG_WAITING | CM_SCACHEFLAG_RDR_IN_USE));
+                _InterlockedAnd(&scp->flags, ~(CM_SCACHEFLAG_WAITING | CM_SCACHEFLAG_RDR_IN_USE));
 
                 scp->redirBufCount = 0;
                 scp->redirQueueT = NULL;
@@ -2028,7 +2026,7 @@ void cm_DiscardSCache(cm_scache_t *scp)
     }
     scp->cbExpires = 0;
     scp->cbIssued = 0;
-    _InterlockedAnd(&scp->flags, ~(CM_SCACHEFLAG_CALLBACK | CM_SCACHEFLAG_LOCAL | CM_SCACHEFLAG_RDR_IN_USE));
+    _InterlockedAnd(&scp->flags, ~(CM_SCACHEFLAG_LOCAL | CM_SCACHEFLAG_RDR_IN_USE));
     cm_dnlcPurgedp(scp);
     cm_dnlcPurgevp(scp);
     cm_FreeAllACLEnts(scp);
index d7d39d5..b6bc811 100644 (file)
@@ -263,9 +263,7 @@ typedef struct cm_scache {
 #define CM_SCACHETYPE_INVALID           99      /* an invalid link */
 
 /* flag bits */
-#define CM_SCACHEFLAG_STATD             0x01    /* status info is valid */
 #define CM_SCACHEFLAG_DELETED           0x02    /* file has been deleted */
-#define CM_SCACHEFLAG_CALLBACK          0x04    /* have a valid callback */
 #define CM_SCACHEFLAG_STORING           0x08    /* status being stored back */
 #define CM_SCACHEFLAG_FETCHING         0x10    /* status being fetched */
 #define CM_SCACHEFLAG_SIZESTORING      0x20    /* status being stored that