register afs_int32 code;
register struct rx_call *tcall;
afs_size_t tlen, xlen = 0;
- XSTATS_DECLS AFS_STATCNT(afs_StoreMini);
+ XSTATS_DECLS;
+ AFS_STATCNT(afs_StoreMini);
afs_Trace2(afs_iclSetp, CM_TRACE_STOREMINI, ICL_TYPE_POINTER, avc,
ICL_TYPE_INT32, avc->m.Length);
tlen = avc->m.Length;
struct conn *tc;
struct osi_file *tfile;
struct rx_call *tcall;
- XSTATS_DECLS for (bytes = 0, j = 0; !code && j <= high; j++) {
+ XSTATS_DECLS;
+ for (bytes = 0, j = 0; !code && j <= high; j++) {
if (dcList[j]) {
ObtainSharedLock(&(dcList[j]->lock), 629);
if (!bytes)
ObtainWriteLock(&tdc->lock, 679);
ZapDCE(tdc);
if (vType(avc) == VDIR)
- DZap(&tdc->f.inode);
+ DZap(tdc);
ReleaseWriteLock(&tdc->lock);
afs_PutDCache(tdc);
}
afs_CFileTruncate(tfile, newSize);
afs_CFileClose(tfile);
afs_AdjustSize(tdc, newSize);
+ if (alen < tdc->validPos) {
+ if (alen < AFS_CHUNKTOBASE(tdc->f.chunk))
+ tdc->validPos = 0;
+ else
+ tdc->validPos = alen;
+ }
ConvertWToSLock(&tdc->lock);
}
ReleaseSharedLock(&tdc->lock);