]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-afs-lock-init-20050320
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Sun, 20 Mar 2005 20:09:13 +0000 (20:09 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 20 Mar 2005 20:09:13 +0000 (20:09 +0000)
FIXES 17939

add missing afs lock initialization

(cherry picked from commit 1aa23c665347d00f9ef4f81e58830799a6e4783d)

src/afs/afs_dcache.c
src/afs/afs_dynroot.c

index 16ba445957345697bd9d011c94a0d6cc48c50fc0..e19999a7ed304d938d5cd099083c5a12b62b6bb1 100644 (file)
@@ -3227,8 +3227,14 @@ afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk, int aflags)
     afs_freeDSList = &tdp[0];
     for (i = 0; i < aDentries - 1; i++) {
        tdp[i].lruq.next = (struct afs_q *)(&tdp[i + 1]);
+        RWLOCK_INIT(&tdp[i].lock, "dcache lock");
+        RWLOCK_INIT(&tdp[i].tlock, "dcache tlock");
+        RWLOCK_INIT(&tdp[i].mflock, "dcache flock");
     }
     tdp[aDentries - 1].lruq.next = (struct afs_q *)0;
+    RWLOCK_INIT(&tdp[aDentries - 1].lock, "dcache lock");
+    RWLOCK_INIT(&tdp[aDentries - 1].tlock, "dcache tlock");
+    RWLOCK_INIT(&tdp[aDentries - 1].mflock, "dcache flock");
 
     afs_stats_cmperf.cacheBlocksOrig = afs_stats_cmperf.cacheBlocksTotal =
        afs_cacheBlocks = ablocks;
index a559496639107983f140fe142ec8925c396cf870..1d2563ef46e01cb5c7f2d4c4058f94c333b8f98d 100644 (file)
@@ -614,6 +614,8 @@ afs_DynrootNewVnode(struct vcache *avc, struct AFSFetchStatus *status)
 int
 afs_SetDynrootEnable(int enable)
 {
+    RWLOCK_INIT(&afs_dynrootDirLock, "afs_dynrootDirLock");
+    RWLOCK_INIT(&afs_dynSymlinkLock, "afs_dynSymlinkLock");
     afs_dynrootEnable = enable;
     return afs_dynrootCellInit();
 }