X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2Fafs_dcache.c;h=321e37f5ac43e8ea0bc61abff535409bf2bab248;hp=60d2a3106ea2b01d48e8c19bbd46815bce2800c3;hb=f6af4a155d3636e8f812e40c7169dd8902ae64be;hpb=54e84a98f9747bb5bb2ad4b8031115ad7684c914 diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index 60d2a31..321e37f 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -1188,6 +1188,7 @@ afs_FreeDiscardedDCache(void) * Truncate the element to reclaim its space */ tfile = afs_CFileOpen(&tdc->f.inode); + osi_Assert(tfile); afs_CFileTruncate(tfile, 0); afs_CFileClose(tfile); afs_AdjustSize(tdc, 0); @@ -1619,6 +1620,7 @@ afs_AllocDiscardDSlot(afs_int32 lock) if ((lock & 2)) { /* Truncate the chunk so zeroes get filled properly */ file = afs_CFileOpen(&tdc->f.inode); + osi_Assert(file); afs_CFileTruncate(file, 0); afs_CFileClose(file); afs_AdjustSize(tdc, 0); @@ -2076,6 +2078,7 @@ afs_GetDCache(struct vcache *avc, afs_size_t abyte, /* no data in file to read at this position */ UpgradeSToWLock(&tdc->lock, 607); file = afs_CFileOpen(&tdc->f.inode); + osi_Assert(file); afs_CFileTruncate(file, 0); afs_CFileClose(file); afs_AdjustSize(tdc, 0); @@ -2295,6 +2298,7 @@ afs_GetDCache(struct vcache *avc, afs_size_t abyte, */ DZap(tdc); /* pages in cache may be old */ file = afs_CFileOpen(&tdc->f.inode); + osi_Assert(file); afs_RemoveVCB(&avc->f.fid); tdc->f.states |= DWriting; tdc->dflags |= DFFetching; @@ -3616,6 +3620,8 @@ afs_MakeShadowDir(struct vcache *avc, struct dcache *adc) /* Open the files. */ tfile_src = afs_CFileOpen(&adc->f.inode); tfile_dst = afs_CFileOpen(&new_dc->f.inode); + osi_Assert(tfile_src); + osi_Assert(tfile_dst); /* And now copy dir dcache data into this dcache, * 4k at a time.