U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] fs: exfat: Flush node before put in read() callback
@ 2025-04-13  8:54 Marek Vasut
  2025-04-13  8:55 ` [PATCH 2/7] fs: exfat: Inhibit "impossible" print on write to bogus file Marek Vasut
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Marek Vasut @ 2025-04-13  8:54 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Heinrich Schuchardt, Ilias Apalodimas,
	Mattijs Korpershoek, Simon Glass, Tom Rini

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: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 fs/exfat/io.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/exfat/io.c b/fs/exfat/io.c
index 81e82829c72..12498a4a6ec 100644
--- a/fs/exfat/io.c
+++ b/fs/exfat/io.c
@@ -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;
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-22 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-13  8:54 [PATCH 1/7] fs: exfat: Flush node before put in read() callback Marek Vasut
2025-04-13  8:55 ` [PATCH 2/7] fs: exfat: Inhibit "impossible" print on write to bogus file Marek Vasut
2025-04-13  8:55 ` [PATCH 3/7] fs: exfat: Rework exfat_fs_readdir() to behave like exfat_fs_ls() Marek Vasut
2025-04-13  8:55 ` [PATCH 4/7] fs: exfat: Fix exfat_fs_exists() return value Marek Vasut
2025-04-13  8:55 ` [PATCH 5/7] test_fs: Add test -e test Marek Vasut
2025-04-13  8:55 ` [PATCH 6/7] fs: exfat: Implement trivial 'rename' support Marek Vasut
2025-04-13  8:55 ` [PATCH 7/7] test_fs: Test 'mv' command on exfat and fs_generic Marek Vasut
2025-04-22 13:58 ` [PATCH 1/7] fs: exfat: Flush node before put in read() callback Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox