From: relan Date: Sat, 7 Nov 2015 08:10:29 +0000 (+0300) Subject: Flush clusters bitmap on each file close. X-Git-Tag: android-x86-6.0-r1~15 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-exfat.git;a=commitdiff_plain;h=c4d1bc1e671c875d7fa6a1db105fe8fb6a0aeafe 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. --- 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)