From patchwork Wed Apr 26 06:59:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heloise NH X-Patchwork-Id: 9700347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB13960245 for ; Wed, 26 Apr 2017 07:03:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D32284DA for ; Wed, 26 Apr 2017 07:03:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD773284EA; Wed, 26 Apr 2017 07:03:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71ED3284DA for ; Wed, 26 Apr 2017 07:03:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1432776AbdDZHDq (ORCPT ); Wed, 26 Apr 2017 03:03:46 -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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=lA3n8Lr39MBGoz4Nhv EFLlXUFpuyvJLojjK0j2GFTYM=; b=qVFhqvFKqQrvHeaVOGYLHTSPtFIF2wSZXD hFhRevxXbHzPnbPXF7FIggHrdiIln2caR5Xia0cfXINNm7jDl5xQFneRfeX8yzly /sbJ/t37fkLvBR+WMAVkl40zl/AXq+TycZ84/6Wo46AoTW+NGVdoKNnrskJxtmbn ySUSNrBnY= Received: from localhost (unknown [124.16.139.198]) by smtp7 (Coremail) with SMTP id C8CowACHFzusRQBZnqG0Ag--.20669S2; Wed, 26 Apr 2017 15:01:00 +0800 (CST) 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);