]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
make VOL_STATE_VLRU_ADD exclusive
authorTom Keiser <tkeiser@sinenomine.net>
Tue, 29 Sep 2009 14:25:55 +0000 (10:25 -0400)
committerDerrick Brashear <shadow|account-1000005@unknown>
Wed, 30 Sep 2009 09:43:32 +0000 (02:43 -0700)
VLRU_Add_r() places a volume into VOL_STATE_VLRU_ADD before
calling VLRU_Wait_r(), which drops VOL_LOCK while waiting
for the required VLRU queue to quiesce.  Thus, it is essential
that state VOL_STATE_VLRU_ADD be marked exclusive so that
another thread cannot mutate state until the VLRU generation
add transaction completes.

Reviewed-on: http://gerrit.openafs.org/554
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/volume_inline.h

index d0bc2f2d4d03dc4ebeea2bf1e5e4b6bae18751bf..b5be2acd51377367cb243a888f305b17a82de45b 100644 (file)
@@ -66,6 +66,7 @@ VIsExclusiveState(VolState state)
     case VOL_STATE_VNODE_GET:
     case VOL_STATE_VNODE_CLOSE:
     case VOL_STATE_VNODE_RELEASE:
+    case VOL_STATE_VLRU_ADD:
        return 1;
     default:
        return 0;