From e2cee4255dfb3bd7668a4a70511742266d92bec6 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 7 Nov 2023 19:08:39 +0100 Subject: [PATCH] pkg/lwext4: don't consider fs mounted if recover fails --- pkg/lwext4/fs/lwext4_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lwext4/fs/lwext4_fs.c b/pkg/lwext4/fs/lwext4_fs.c index 47e1989156..56abfdb9ea 100644 --- a/pkg/lwext4/fs/lwext4_fs.c +++ b/pkg/lwext4/fs/lwext4_fs.c @@ -214,7 +214,6 @@ static int _mount(vfs_mount_t *mountp) } mp->os_locks = &_lwext4_os_lock; - mp->mounted = true; res = ext4_recover(fs->mp.name); if (res != EOK && res != ENOTSUP) { @@ -228,6 +227,7 @@ static int _mount(vfs_mount_t *mountp) return -res; } + mp->mounted = true; ext4_cache_write_back(fs->mp.name, 1); return -res;