]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Cache bypass: fix use of incorrect "states"
authorMarc Dionne <marc.c.dionne@gmail.com>
Tue, 11 Jan 2011 02:31:18 +0000 (21:31 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 11 Jan 2011 20:24:36 +0000 (12:24 -0800)
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.

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>
(cherry picked from commit 8c541079573274d726180d3d9679c6a26cda84ea)

Change-Id: Ibaae9a766ef01cf4c68995c2bef454bae5d03b38
Reviewed-on: http://gerrit.openafs.org/3640
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_bypasscache.c

index 2e92b413d19d961a62f1c405b719f6d805163dbe..18851306db723a961f65eedae452d07756b5fb25 100644 (file)
@@ -159,12 +159,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;
     }
 
@@ -239,7 +239,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 */