fs: exfat: Flush node before put in read() callback

Make sure the node is never dirty before being released, flush
the node first using exfat_flush_node() and only then release
the node using exfat_put_node(). This now matches the behavior
of exfat_fs_write() too.

Fixes: b86a651b64 ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut
2025-04-21 11:07:04 -06:00
committed by Tom Rini
parent 739ad58dbe
commit aeed137372
+1 -3
View File
@@ -898,9 +898,7 @@ int exfat_fs_read(const char *filename, void *buf, loff_t offset, loff_t len,
*actread = sz;
exfat_put_node(&ctxt.ef, node);
return exfat_flush_node(&ctxt.ef, node);
err = exfat_flush_node(&ctxt.ef, node);
exit:
exfat_put_node(&ctxt.ef, node);
return err;