mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
dcache-locking-cleanup-20020624
don't oops if getDCache failed
This commit is contained in:
parent
30433f36a9
commit
68de4bbb02
@ -258,7 +258,7 @@ tagain:
|
||||
ReleaseReadLock(&avc->lock);
|
||||
tdc = afs_GetDCache(avc, filePos, &treq, &offset, &len, 1);
|
||||
ObtainReadLock(&avc->lock);
|
||||
ObtainReadLock(&tdc->lock);
|
||||
if (tdc) ObtainReadLock(&tdc->lock);
|
||||
}
|
||||
}
|
||||
|
||||
@ -801,7 +801,7 @@ tagain:
|
||||
ReleaseReadLock(&avc->lock);
|
||||
tdc = afs_GetDCache(avc, filePos, &treq, &offset, &len, 1);
|
||||
ObtainReadLock(&avc->lock);
|
||||
ObtainReadLock(&tdc->lock);
|
||||
if (tdc) ObtainReadLock(&tdc->lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ tagain:
|
||||
|
||||
tdc = afs_GetDCache(adp, (afs_size_t) 0, &treq, &offset, &len, 1); /* test for error below */
|
||||
ObtainWriteLock(&adp->lock,142);
|
||||
ObtainSharedLock(&tdc->lock, 638);
|
||||
if (tdc) ObtainSharedLock(&tdc->lock, 638);
|
||||
|
||||
/*
|
||||
* Make sure that the data in the cache is current. We may have
|
||||
|
@ -125,7 +125,7 @@ afs_symlink
|
||||
tdc = afs_GetDCache(adp, (afs_size_t) 0, &treq, &offset, &len, 1);
|
||||
volp = afs_FindVolume(&adp->fid, READ_LOCK); /*parent is also in same vol*/
|
||||
ObtainWriteLock(&adp->lock,156);
|
||||
ObtainWriteLock(&tdc->lock, 636);
|
||||
if (tdc) ObtainWriteLock(&tdc->lock, 636);
|
||||
ObtainSharedLock(&afs_xvcache,17); /* prevent others from creating this entry */
|
||||
/* XXX Pay attention to afs_xvcache around the whole thing!! XXX */
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user