From: Derrick Brashear Date: Sat, 10 Jan 2004 18:54:53 +0000 (+0000) Subject: STABLE12-release-zero-length-dcache-entries-20040110 X-Git-Tag: openafs-stable-1_2_11~1 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d5faa18529993b98705ed14f227656101c6a974e;p=packages%2Fo%2Fopenafs.git STABLE12-release-zero-length-dcache-entries-20040110 as from kolya@mit.edu's rewrite of this code for 1.3.x --- diff --git a/src/afs/afs_segments.c b/src/afs/afs_segments.c index ea18b8e9a..dae896bbe 100644 --- a/src/afs/afs_segments.c +++ b/src/afs/afs_segments.c @@ -551,7 +551,17 @@ afs_StoreAllSegments(avc, areq, sync) bytes = 0; } } - } /* if (j) */ + /* Release any zero-length dcache entries in our interval + * that we locked but didn't store back above. + */ + for (j = 0; j <= high; j++) { + tdc = dcList[j]; + if (tdc) { + osi_Assert(tdc->f.chunkBytes == 0); + afs_PutDCache(tdc); + } + } + } /* if (j) */ minj += NCHUNKSATONCE; } while ( !code && moredata );