Browse Source

DFS/jffs2: fix bug when umount jffs2

found by haitao5198
clear mount parition device talbe when jffs2 mount falied
prife 11 years ago
parent
commit
f71f0595d6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      components/dfs/filesystems/jffs2/dfs_jffs2.c

+ 1 - 0
components/dfs/filesystems/jffs2/dfs_jffs2.c

@@ -178,6 +178,7 @@ static int dfs_jffs2_mount(struct dfs_filesystem* fs,
 	result = jffs2_mount(NULL, mte);
 	result = jffs2_mount(NULL, mte);
 	if (result != 0)
 	if (result != 0)
 	{	
 	{	
+		device_partition[index].dev = NULL;
 		return jffs2_result_to_dfs(result);
 		return jffs2_result_to_dfs(result);
 	}
 	}
 	/* save this pointer */
 	/* save this pointer */