From: Derrick Brashear Date: Wed, 29 Aug 2001 01:46:57 +0000 (+0000) Subject: linux-call-afs-dopartialwrite-from-afs-memwrite-and-afs-ufswrite-not-afs-linux-write... X-Git-Tag: BP-openafs-stable-1_2_x~46 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=0eb68cde324d26b145e648075524f5e2207c9101 linux-call-afs-dopartialwrite-from-afs-memwrite-and-afs-ufswrite-not-afs-linux-write-20010828 attempt to deal with case where data not being flushed from cache --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 1227272..4889510 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -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, diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index f3e802f..08fa24e 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -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.