"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fs: ext4fs: Add initialization failure recovery path in ext4fs_write

Don't invoke ext4fs_deinit() in ext4fs_write() if the failure occurs
during initialization. It would result in a crash since ext4fs_init()
has already done that.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

authored by

Tony Dinh and committed by
Tom Rini
1f8fd9d3 371a76e8

+3 -1
+3 -1
fs/ext4/ext4_write.c
··· 877 877 878 878 if (ext4fs_init() != 0) { 879 879 printf("error in File System init\n"); 880 - goto fail; 880 + /* Skip ext4fs_deinit since ext4fs_init() already done that */ 881 + goto fail_init; 881 882 } 882 883 883 884 missing_feat = le32_to_cpu(fs->sb->feature_incompat) & ~EXT4_FEATURE_INCOMPAT_SUPP; ··· 1050 1051 return 0; 1051 1052 fail: 1052 1053 ext4fs_deinit(); 1054 + fail_init: 1053 1055 free(inode_buffer); 1054 1056 free(g_parent_inode); 1055 1057 free(temp_ptr);