shithub: lwext4

Download patch

ref: 15926087e10bfbc88cadbac9dae4a944c6fd9c3e
parent: 2af977421c02df80c89b93851ee8c943fd0fc8be
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Apr 12 05:57:39 EDT 2021

ext4_mount: mark as mounted at the end, there might still be errors before

--- a/src/ext4.c
+++ b/src/ext4.c
@@ -384,7 +384,6 @@
 	for (size_t i = 0; i < CONFIG_EXT4_MOUNTPOINTS_COUNT; ++i) {
 		if (!s_mp[i].mounted) {
 			strcpy(s_mp[i].name, mount_point);
-			s_mp[i].mounted = 1;
 			mp = &s_mp[i];
 			break;
 		}
@@ -429,6 +428,7 @@
 	}
 
 	bd->fs = &mp->fs;
+	mp->mounted = 1;
 	return r;
 }