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 <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Marc Dionne 2010-07-02 09:13:50 -04:00 committed by Derrick Brashear
parent b23d86e430
commit ff072a08b5

View File

@ -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)