diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 16ba445957..e19999a7ed 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -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; diff --git a/src/afs/afs_dynroot.c b/src/afs/afs_dynroot.c index a559496639..1d2563ef46 100644 --- a/src/afs/afs_dynroot.c +++ b/src/afs/afs_dynroot.c @@ -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(); }