linux-call-afs-dopartialwrite-from-afs-memwrite-and-afs-ufswrite-not-afs-linux-write...
authorDerrick Brashear <shadow@dementia.org>
Wed, 29 Aug 2001 01:46:57 +0000 (01:46 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 29 Aug 2001 01:46:57 +0000 (01:46 +0000)
attempt to deal with case where data not being flushed from cache

src/afs/LINUX/osi_vnodeops.c
src/afs/VNOPS/afs_vnop_write.c

index 1227272..4889510 100644 (file)
@@ -134,10 +134,6 @@ static ssize_t afs_linux_write(struct file *fp, const char *buf, size_t count,
     ObtainWriteLock(&vcp->lock, 530);
     vcp->m.Date = osi_Time(); /* set modification time */
     afs_FakeClose(vcp, credp);
-    if (code>=0)
-       code2 = afs_DoPartialWrite(vcp, &treq);
-    if (code2 && code >=0)
-       code = (ssize_t) -code2;
     ReleaseWriteLock(&vcp->lock);
        
     afs_Trace4(afs_iclSetp, CM_TRACE_WRITEOP, ICL_TYPE_POINTER, vcp,
index f3e802f..08fa24e 100644 (file)
@@ -171,7 +171,7 @@ afs_MemWrite(avc, auio, aio, acred, noLock)
        return (EFBIG);
     }
 #endif
-#ifdef AFS_VM_RDWR_ENV
+#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV))
     /*
      * If write is implemented via VM, afs_FakeOpen() is called from the
      * high-level write op.
@@ -280,7 +280,7 @@ afs_MemWrite(avc, auio, aio, acred, noLock)
        if (filePos > avc->m.Length)
            avc->m.Length = filePos;
 #endif
-#ifndef        AFS_VM_RDWR_ENV
+#if (!defined(AFS_VM_RDWR_ENV)||defined(AFS_LINUX20_ENV))
        /*
         * If write is implemented via VM, afs_DoPartialWrite() is called from
         * the high-level write op.