From: OGAWA Hirofumi Subject: [PATCH] fat: Fix missed error code by "add support for DOS 1.x formatted volumes" Date: Tue, 03 Jun 2014 21:58:47 +0900 Message-ID: <87vbsitaig.fsf_-_@devron.myhome.or.jp> References: <20140602154016.697bf121@alan.etchedpixels.co.uk> <87bnubuyam.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain Cc: One Thousand Gnomes , linux-fsdevel@vger.kernel.org, Conrad M To: Andrew Morton Return-path: Received: from mail.parknet.co.jp ([210.171.160.6]:58123 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753304AbaFCM6x (ORCPT ); Tue, 3 Jun 2014 08:58:53 -0400 In-Reply-To: (Conrad M.'s message of "Mon, 2 Jun 2014 09:21:13 -0700") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: >> " (logical sector size = %u)", logical_sector_size); >> _ >> -- >> OGAWA Hirofumi > > Signed-off-by: Conrad Meyer > > Patch LGTM. Apologies for missing this on the first go-around. Thanks for review. Please apply the following patch to fix "add support for DOS 1.x formatted volumes" patch. 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. Reviewed-by: Conrad Meyer Signed-off-by: OGAWA Hirofumi --- 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