Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1435190AbdDZHDy (ORCPT ); Wed, 26 Apr 2017 03:03:54 -0400 Received: from m12-11.163.com ([220.181.12.11]:43845 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1432658AbdDZHDp (ORCPT ); Wed, 26 Apr 2017 03:03:45 -0400 From: Heloise To: akpm@linux-foundation.org, fabf@skynet.be, viro@zeniv.linux.org.uk, jack@suse.cz, mszeredi@redhat.com, mikulas@twibright.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Heloise Subject: [PATCH] fs:affs:fix sb_bread() return value Date: Tue, 25 Apr 2017 23:59:14 -0700 Message-Id: <1493189954-10049-1-git-send-email-os@iscas.ac.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: C8CowACHFzusRQBZnqG0Ag--.20669S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUsE_MUUUUU X-Originating-IP: [124.16.139.198] X-CM-SenderInfo: xnhu0vxosd3uhkbx1vxdwhqiywtou0bp/xtbB0AzFglUL-pCamwAAsq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 600 Lines: 24 When the function sb_bread() fails, the return value should be -EIO, fix it. Signed-off-by: Heloise --- fs/affs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/affs/super.c b/fs/affs/super.c index c2c27a8..df1f4fe 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -419,7 +419,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) boot_bh = sb_bread(sb, 0); if (!boot_bh) { pr_err("Cannot read boot block\n"); - return -EINVAL; + return -EIO; } memcpy(sig, boot_bh->b_data, 4); brelse(boot_bh); -- 2.1.0