From: Jeffrey Altman Date: Sat, 5 Jan 2008 22:20:30 +0000 (+0000) Subject: DEVEL15-windows-follow-backup-path-20080105 X-Git-Tag: openafs-devel-1_5_30~8 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=91531d52c2fc4f0bcd3328601e73aad9b7bfff00;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-follow-backup-path-20080105 LICENSE MIT parens are required in order to get the desired behavior (cherry picked from commit d27e82c8e2dcdf81ce8e8e6e849828881256f5fc) --- diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index 67fb3e45e..24b5657d1 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -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