]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE146-viced-accurately-track-file-callbacks-20071112
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 13 Dec 2007 20:57:11 +0000 (20:57 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 13 Dec 2007 20:57:11 +0000 (20:57 +0000)
LICENSE IPL10
FIXES 74708

this should fix the issue with cbfree being corrupted. a more exhaustive pointer-blunting patch should probably be pulled in, but, this is simple and obvious

(cherry picked from commit d284c0e7c11e8ee4755ac152e5e47d4abf304afc)

src/viced/callback.c

index 0afd567963fed03f634cd172df3e0e306b66668d..cac19529fcb51df36168818e0da23d3d1c4f73ea 100644 (file)
@@ -493,7 +493,7 @@ CDelPtr(register struct FileEntry *fe, register afs_uint32 * cbp,
        CcdelB++;
     *cbp = cb->cnext;
     FreeCB(cb);
-    if (deletefe && (--fe->ncbs == 0))
+    if ((--fe->ncbs == 0) && deletefe)
        FDel(fe);
     return 0;
 }
@@ -1030,6 +1030,7 @@ DeleteFileCallBacks(AFSFid * fid)
        TDel(cb);
        HDel(cb);
        FreeCB(cb);
+       fe->ncbs--;
     }
     FDel(fe);
     H_UNLOCK;