mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Cache bypass: fix use of incorrect "states"
Test and set the correct field for cache bypass flags. There was some confusion between cachingStates and the states associated with vcache entries in a few places. Change-Id: Iae957b6f838a44d75776e49662b4aba685800d19 Reviewed-on: http://gerrit.openafs.org/3637 Reviewed-by: Matt Benjamin <matt@linuxbox.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
336256c7a0
commit
8c54107957
@ -153,12 +153,12 @@ afs_TransitionToBypass(struct vcache *avc,
|
||||
* Someone may have beat us to doing the transition - we had no lock
|
||||
* when we checked the flag earlier. No cause to panic, just return.
|
||||
*/
|
||||
if (avc->f.states & FCSBypass)
|
||||
if (avc->cachingStates & FCSBypass)
|
||||
goto done;
|
||||
|
||||
/* If we never cached this, just change state */
|
||||
if (setDesire && (!(avc->cachingStates & FCSBypass))) {
|
||||
avc->f.states |= FCSBypass;
|
||||
avc->cachingStates |= FCSBypass;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ afs_TransitionToCaching(struct vcache *avc,
|
||||
* Someone may have beat us to doing the transition - we had no lock
|
||||
* when we checked the flag earlier. No cause to panic, just return.
|
||||
*/
|
||||
if (!(avc->f.states & FCSBypass))
|
||||
if (!(avc->cachingStates & FCSBypass))
|
||||
goto done;
|
||||
|
||||
/* Ok, we actually do need to flush */
|
||||
|
Loading…
Reference in New Issue
Block a user