From ff072a08b5c5204a27d3807ad592db84e87c697d Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Fri, 2 Jul 2010 09:13:50 -0400 Subject: [PATCH] Linux: cache bypass: fix FCSBypass tests Add some parentheses around the tests for FCSBypass. Without them, the test will not always give the intended result. Change-Id: I94cb2b2c95c702981fce9cff066b620bce652ee1 Reviewed-on: http://gerrit.openafs.org/2324 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/afs_bypasscache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c index 2d09566a25..dbda01b07f 100644 --- a/src/afs/afs_bypasscache.c +++ b/src/afs/afs_bypasscache.c @@ -159,7 +159,7 @@ afs_TransitionToBypass(register struct vcache *avc, ObtainWriteLock(&avc->lock, 925); /* If we never cached this, just change state */ - if (setDesire && (!avc->cachingStates & FCSBypass)) { + if (setDesire && (!(avc->cachingStates & FCSBypass))) { avc->f.states |= FCSBypass; goto done; } @@ -220,7 +220,7 @@ afs_TransitionToCaching(register struct vcache *avc, if (!avc) return; - if (!avc->f.states & FCSBypass) + if (!(avc->f.states & FCSBypass)) osi_Panic("afs_TransitionToCaching: illegal transition to caching--already caching\n"); if (aflags & TRANSChangeDesiredBit)