One Thousand Gnomes <gnomes@xxxxxxxxxxxxxxxxxxx> writes: > A FAT mount of 512 byte block fs on 4K media now crashes. It used to just > error. This is of course doubly fun if you've got your own USB key > firmware and an automounting distribution 8-) This seems to be the bug of recent patch to fatfs. Does the following patch fix this? Thanks. Subject: [PATCH] fat: Fix missed error code by "add support for DOS 1.x formatted volumes" In "add support for DOS 1.x formatted volumes" patch, "error" is overwritten by fat_read_bpb(). This patch reset "error" to -EIO, to return proper error. Cc: Conrad Meyer <cse.cem@xxxxxxxxx> Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> --- fs/fat/inode.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/fat/inode.c~fat-fix-error-handling fs/fat/inode.c --- linux-next/fs/fat/inode.c~fat-fix-error-handling 2014-06-03 00:20:03.773448083 +0900 +++ linux-next-hirofumi/fs/fat/inode.c 2014-06-03 00:20:08.717435605 +0900 @@ -1622,6 +1622,7 @@ int fat_fill_super(struct super_block *s logical_sector_size = bpb.fat_sector_size; sbi->sec_per_clus = bpb.fat_sec_per_clus; + error = -EIO; if (logical_sector_size < sb->s_blocksize) { fat_msg(sb, KERN_ERR, "logical sector size too small for device" " (logical sector size = %u)", logical_sector_size); _ -- OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html