tlen = avc->f.truncPos;
avc->f.truncPos = AFS_NOTRUNC;
avc->f.states &= ~CExtendedFile;
+ memset(&InStatus, 0, sizeof(InStatus));
do {
tc = afs_Conn(&avc->f.fid, areq, SHARED_LOCK, &rxconn);
AFS_STATCNT(afs_StoreAllSegments);
- hset(oldDV, avc->f.m.DataVersion);
- hset(newDV, avc->f.m.DataVersion);
hash = DVHash(&avc->f.fid);
foreign = (avc->f.states & CForeign);
dcList = osi_AllocLargeSpace(AFS_LRALLOCSIZ);
/*printf("Net down in afs_StoreSegments\n");*/
return ENETDOWN;
}
+
+ /*
+ * Can't do this earlier because osi_VM_StoreAllSegments drops locks
+ * and can indirectly do some stores that increase the DV.
+ */
+ hset(oldDV, avc->f.m.DataVersion);
+ hset(newDV, avc->f.m.DataVersion);
+
ConvertWToSLock(&avc->lock);
/*
* invalidate all of the relevant chunks. Otherwise, the chunks
* will be left with the 'new' data that was never successfully
* written to the server, but the DV in the dcache is still the
- * old DV. So, we may indefintely serve serve applications data
+ * old DV. So, we may indefinitely serve data to applications
* that is not actually in the file on the fileserver. If we
* cannot afs_GetValidDSlot the appropriate entries, currently
* there is no way to ensure the dcache is invalidated. So for