avc->states |= CDirty;
tvec = (struct iovec *) osi_AllocSmallSpace(sizeof(struct iovec));
while (totalLength > 0) {
-#if 0 /* Can't call without tdc. Can't call later since GetDCache can be
- called with !tdc. Leaving it out for now. */
/*
* The following lines are necessary because afs_GetDCache with
* flag == 4 expects the length field to be filled. It decides
* before writing or not (when the whole chunk is overwritten!).
*/
len = totalLength; /* write this amount by default */
- offset = filePos - AFS_CHUNKTOBASE(tdc->f.chunk);
- max = AFS_CHUNKTOSIZE(tdc->f.chunk); /* max size of this chunk */
- if (max <= len + offset) { /*if we'd go past the end of this chunk */
- /* it won't all fit in this chunk, so write as much
- as will fit */
- len = max - offset;
- }
-#endif
/* read the cached info */
if (noLock) {
tdc = afs_FindDCache(avc, filePos);
#define osi_rxSleep(a) afs_osi_Sleep(a)
#define osi_rxWakeup(a) afs_osi_Wakeup(a)
#endif /* RX_KERNEL_TRACE */
+#else /* AFS_GLOBAL_SUNLOCK || RX_ENABLE_LOCKS */
+#define osi_rxSleep(a) afs_osi_Sleep(a)
+#define osi_rxWakeup(a) afs_osi_Wakeup(a)
#endif
extern int osi_utoa(char *buf, size_t len, unsigned long val);