Skip to content

Commit e2cee42

Browse files
committed
pkg/lwext4: don't consider fs mounted if recover fails
1 parent f731ec7 commit e2cee42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/lwext4/fs/lwext4_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ static int _mount(vfs_mount_t *mountp)
214214
}
215215

216216
mp->os_locks = &_lwext4_os_lock;
217-
mp->mounted = true;
218217

219218
res = ext4_recover(fs->mp.name);
220219
if (res != EOK && res != ENOTSUP) {
@@ -228,6 +227,7 @@ static int _mount(vfs_mount_t *mountp)
228227
return -res;
229228
}
230229

230+
mp->mounted = true;
231231
ext4_cache_write_back(fs->mp.name, 1);
232232

233233
return -res;

0 commit comments

Comments
 (0)