mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
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:
parent
b23d86e430
commit
ff072a08b5
@ -159,7 +159,7 @@ afs_TransitionToBypass(register struct vcache *avc,
|
|||||||
ObtainWriteLock(&avc->lock, 925);
|
ObtainWriteLock(&avc->lock, 925);
|
||||||
|
|
||||||
/* If we never cached this, just change state */
|
/* If we never cached this, just change state */
|
||||||
if (setDesire && (!avc->cachingStates & FCSBypass)) {
|
if (setDesire && (!(avc->cachingStates & FCSBypass))) {
|
||||||
avc->f.states |= FCSBypass;
|
avc->f.states |= FCSBypass;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ afs_TransitionToCaching(register struct vcache *avc,
|
|||||||
if (!avc)
|
if (!avc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!avc->f.states & FCSBypass)
|
if (!(avc->f.states & FCSBypass))
|
||||||
osi_Panic("afs_TransitionToCaching: illegal transition to caching--already caching\n");
|
osi_Panic("afs_TransitionToCaching: illegal transition to caching--already caching\n");
|
||||||
|
|
||||||
if (aflags & TRANSChangeDesiredBit)
|
if (aflags & TRANSChangeDesiredBit)
|
||||||
|
Loading…
Reference in New Issue
Block a user