From c4d1bc1e671c875d7fa6a1db105fe8fb6a0aeafe Mon Sep 17 00:00:00 2001 From: relan Date: Sat, 7 Nov 2015 11:10:29 +0300 Subject: [PATCH] Flush clusters bitmap on each file close. Put FS into a clean state when all files are closed. Flush to the non-volatile storage is not enforced though, so there can (and most probably will) be some dirty data in various OS- and hardware-controlled caches. --- libexfat/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexfat/node.c b/libexfat/node.c index f3d10e0..d05f20d 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -664,7 +664,7 @@ int exfat_flush_node(struct exfat* ef, struct exfat_node* node) } node->flags &= ~EXFAT_ATTRIB_DIRTY; - return 0; + return exfat_flush(ef); } static bool erase_entry(struct exfat* ef, struct exfat_node* node) -- 2.11.0