Windows: FlushFile ioctl should call cm_FSync, not buf_CleanVnode

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>
This commit is contained in:
Jeffrey Altman 2010-04-28 12:33:03 -04:00 committed by Jeffrey Altman
parent 1844719127
commit 4f7bf8fb43

View File

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