Windows: FlushFile ioctl should call cm_FSync, not buf_CleanVnode
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 28 Apr 2010 16:33:03 +0000 (12:33 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 2 May 2010 17:38:28 +0000 (10:38 -0700)
When flushing a file, we need to commit the file length changes
as well as the dirty buffers.  Call cm_FSync instead of buf_CleanVnode
which is called by cm_FSync.

LICENSE MIT

Change-Id: Id21e49e0559d20fce3e1d65cb73496a8b6cb1fa1
Reviewed-on: http://gerrit.openafs.org/1875
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_ioctl.c

index c7e71d9..7e3fb98 100644 (file)
@@ -74,7 +74,7 @@ cm_CleanFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp)
 {
     long code;
 
-    code = buf_CleanVnode(scp, userp, reqp);
+    code = cm_FSync(scp, userp, reqp, FALSE);
     if (!code) {
         lock_ObtainWrite(&scp->rw);
         cm_DiscardSCache(scp);