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

parens are required in order to get the desired behavior

(cherry picked from commit d27e82c8e2dcdf81ce8e8e6e849828881256f5fc)

src/WINNT/afsd/cm_vnodeops.c

index 67fb3e4..24b5657 100644 (file)
@@ -1140,9 +1140,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