diff mbox series

[10/18] fs: fat: dentry iterator for fill_dir_slot()

Message ID 20201129020216.4865-11-xypron.glpk@gmx.de
State Accepted, archived
Commit 27ed690382fd6f6e5796ec9c08693a94cfdc0f14
Delegated to: Tom Rini
Headers show
Series fs: fat: fix long name support | expand

Commit Message

Heinrich Schuchardt Nov. 29, 2020, 2:02 a.m. UTC
For reusing deleted directory entries we have to adjust the function called
to step to the next directory entry.

This patch alone is not enough to actually reuse deleted directory entries
as the fill_dir_slot() is still called with first never used directory

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
 fs/fat/fat_write.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series


diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 59cffef34e..0746d73f8d 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -362,7 +362,7 @@  fill_dir_slot(fat_itr *itr, const char *l_name, const char *shortname)

 		/* allocate a cluster for more entries */
-		if (!fat_itr_next(itr) && !itr->dent)
+		if (!next_dent(itr) && !itr->dent)
 			if ((itr->is_root && itr->fsdata->fatsize != 32) ||
 				return -EIO;