]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-flushvolume-vhashq-consistency-20060217
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Fri, 17 Feb 2006 21:53:21 +0000 (21:53 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 17 Feb 2006 21:53:21 +0000 (21:53 +0000)
avoid having vflushed vnodes in play

(cherry picked from commit c320fae82541d3026c9d2a89ffce60fd17ad5ca5)

src/afs/afs_pioctl.c

index 18ef43f0414e09cd46f93f9f4eb6d46f0772c4d5..7a524807dbcf7d67cd3eecf7fbbea2e1fc7730c0 100644 (file)
@@ -2567,7 +2567,6 @@ DECL_PIOCTL(PFlushVolumeData)
     ObtainReadLock(&afs_xvcache);
     i = VCHashV(&avc->fid);
     for (tq = afs_vhashTV[i].prev; tq != &afs_vhashTV[i]; tq = uq) {
-           uq = QPrev(tq);
            tvc = QTOVH(tq);
            if (tvc->fid.Fid.Volume == volume && tvc->fid.Cell == cell) {
                 if (tvc->states & CVInit) {
@@ -2613,15 +2612,14 @@ DECL_PIOCTL(PFlushVolumeData)
                afs_BozonUnlock(&tvc->pvnLock, tvc);
 #endif
 #ifdef AFS_DARWIN80_ENV
-               /* our tvc ptr is still good until now */
-                vnode_put(AFSTOV(tvc));
-               AFS_FAST_RELE(tvc);
-               ObtainReadLock(&afs_xvcache);
-#else
+               vnode_put(AFSTOV(tvc));
+#endif
                ObtainReadLock(&afs_xvcache);
+               uq = QPrev(tq);
                /* our tvc ptr is still good until now */
                AFS_FAST_RELE(tvc);
-#endif
+           } else {
+               uq = QPrev(tq);
            }
        }
     ReleaseReadLock(&afs_xvcache);