]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-linux-disconnected-avoid-ls-hang-20090119
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 19 Jan 2009 17:29:32 +0000 (17:29 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 19 Jan 2009 17:29:32 +0000 (17:29 +0000)
LICENSE IPL10
FIXES 124152

avoid allowing a non-CStatd vcache to make its way into a readdir which causes a
n infinite loop

(cherry picked from commit 9fa51694c6a41323cfeb7b41bb4dff9e8dac77be)

src/afs/afs_vcache.c

index 42efc2d17d93034a33201a79a57ffa959df4c91e..68d9145de7b3b4491428ba5ad9ab0e72561be2d1 100644 (file)
@@ -2020,16 +2020,9 @@ afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq,
        } else {
 
            if (AFS_IS_DISCONNECTED) {
-               if (AFS_IS_DISCON_RW) {
-                   if (vType(tvc) == VDIR)
-                       OutStatus.FileType = Directory;
-
-                   code = tvc?0:ENOENT;
-               } else {
-                   /* Nothing to do otherwise...*/
-                   code = ENETDOWN;
-                   printf("Network is down in afs_GetCache");
-               }
+               /* Nothing to do otherwise...*/
+               code = ENETDOWN;
+               printf("Network is down in afs_GetCache");
            } else
                code = afs_FetchStatus(tvc, afid, areq, &OutStatus);
 
@@ -3288,10 +3281,8 @@ void afs_DisconGiveUpCallbacks() {
     for (i = 0; i < VCSIZE; i++) {
         for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
             if ((tvc->states & CRO) == 0 && tvc->callback) {
-                /* XXX - should we check if the callback has expired here? */
                 afs_QueueVCB(tvc);
                 tvc->callback = NULL;
-                tvc->states &- ~(CStatd | CUnique);
                 nq++;
             }
         }