]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - bitmap.c
Flush bitmap file before truncate.
[thirdparty/mdadm.git] / bitmap.c
index a96e444f5d0383bb0e161dc847b12d7b54f098be..768c17fc0bb480b79917490e6a4a6a77263d2994 100644 (file)
--- a/bitmap.c
+++ b/bitmap.c
@@ -390,6 +390,7 @@ int CreateBitmap(char *filename, int force, char uuid[16],
        }
        
        rv = 0;
+       fflush(fp);
        /* make the file be the right size (well, to the nearest byte) */
        if (ftruncate(fileno(fp), filesize))
                perror("ftrunace");