linux-fix-mmap-write-20020122
authorNickolai Zeldovich <kolya@mit.edu>
Tue, 22 Jan 2002 05:51:19 +0000 (05:51 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 22 Jan 2002 05:51:19 +0000 (05:51 +0000)
a MAP_SHARED write wasn't being flushed back to the server

src/afs/LINUX/osi_vm.c

index 71831df..b5e0491 100644 (file)
@@ -89,7 +89,15 @@ void osi_VM_FSyncInval(struct vcache *avc)
  */
 void osi_VM_StoreAllSegments(struct vcache *avc)
 {
-
+#ifdef AFS_LINUX24_ENV
+    struct inode *ip = (struct inode *) avc;
+   
+    ReleaseWriteLock(&avc->lock);
+    AFS_GUNLOCK();
+    write_inode_now(ip, 1);
+    AFS_GLOCK();
+    ObtainWriteLock(&avc->lock, 121);
+#endif
 }
 
 /* Purge VM for a file when its callback is revoked.