windows-follow-backup-path-20080105
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 5 Jan 2008 22:19:12 +0000 (22:19 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 5 Jan 2008 22:19:12 +0000 (22:19 +0000)
LICENSE MIT

parens are required in order to get the desired behavior

src/WINNT/afsd/cm_vnodeops.c

index 3bd1f3f..c324875 100644 (file)
@@ -1138,9 +1138,11 @@ long cm_FollowMountPoint(cm_scache_t *scp, cm_scache_t *dscp, cm_user_t *userp,
          * volume for the target, then use the .backup of the target
          * instead of the read-write.
          */
-        if (cm_followBackupPath && targetType == RWVOL &&
-            (scp->flags & CM_SCACHEFLAG_RO|CM_SCACHEFLAG_PURERO) == CM_SCACHEFLAG_RO &&
-            volp->bk.ID != 0) {
+        if (cm_followBackupPath && 
+            volp->bk.ID != 0 &&
+            (dscp->flags & (CM_SCACHEFLAG_RO|CM_SCACHEFLAG_PURERO)) == CM_SCACHEFLAG_RO &&
+            (targetType == RWVOL || targetType == ROVOL && volp->ro.ID == 0)
+            ) {
             targetType = BACKVOL;
         } 
         /* if the mt pt is in a read-only volume (not just a