]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-disconnected-refcount-fixes-20081130
authorDragos Tatulea <dragos.tatulea@gmail.com>
Sun, 30 Nov 2008 20:11:17 +0000 (20:11 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 30 Nov 2008 20:11:17 +0000 (20:11 +0000)
LICENSE IPL10
FIXES 123714

fix code which tweaks refcounts on disconnected vcaches to be correct

(cherry picked from commit fb549013e7bb2cf5cb3da3083349cb559c093e8f)

src/afs/VNOPS/afs_vnop_rename.c
src/afs/afs_disconnected.c

index cb7a3f0af6359ddf77d4a7cc64d2bb996345b921..13ced95369087202066fba9c7f7a298637e4c588 100644 (file)
@@ -246,6 +246,8 @@ afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
                    tvc->ddirty_flags |= VDisconRenameSameDir;
                ReleaseWriteLock(&tvc->lock);
            }                   /* if not previously renamed */
+
+           afs_PutVCache(tvc);
        } else {
            code = ENOENT;
        }                       /* if (tvc) */
index aeeaaa37b210e5d2671cbd2b8a6b35427a63ba2b..5579a0759728ca49a943c03a2b12549394592a5e 100644 (file)
@@ -322,8 +322,10 @@ int chk_del_children_hook(void *hdata,
     /* Count unfinished dirty children. VDisconShadowed can still be set,
      * because we need it to remove the shadow dir.
      */
-    if (tvc && tvc->ddirty_flags) {
-       v->count++;
+    if (tvc) {
+       if (tvc->ddirty_flags)
+           v->count++;
+
        afs_PutVCache(tvc);
     }