From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18936C43331 for ; Thu, 2 Apr 2020 02:29:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6F7E20721 for ; Thu, 2 Apr 2020 02:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733311AbgDBC3X (ORCPT ); Wed, 1 Apr 2020 22:29:23 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47118 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732462AbgDBC3X (ORCPT ); Wed, 1 Apr 2020 22:29:23 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 90C198785B598A99A593; Thu, 2 Apr 2020 10:29:14 +0800 (CST) Received: from [127.0.0.1] (10.173.223.234) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Thu, 2 Apr 2020 10:29:10 +0800 Subject: Re: [PATCH -next] ext4: Fix build error while CONFIG_PRINTK is n To: "Theodore Y. Ts'o" References: <20200401073038.33076-1-yuehaibing@huawei.com> <20200401212859.GN768293@mit.edu> CC: , , From: Yuehaibing Message-ID: Date: Thu, 2 Apr 2020 10:29:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20200401212859.GN768293@mit.edu> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.173.223.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/4/2 5:28, Theodore Y. Ts'o wrote: > On Wed, Apr 01, 2020 at 03:30:38PM +0800, YueHaibing wrote: >> fs/ext4/balloc.c: In function ‘ext4_wait_block_bitmap’: >> fs/ext4/balloc.c:519:3: error: implicit declaration of function ‘ext4_error_err’; did you mean ‘ext4_error’? [-Werror=implicit-function-declaration] >> ext4_error_err(sb, EIO, "Cannot read block bitmap - " >> ^~~~~~~~~~~~~~ >> >> Add missing stub helper and fix ext4_abort. >> >> Reported-by: Hulk Robot >> Fixes: 2ea2fc775321 ("ext4: save all error info in save_error_info() and drop ext4_set_errno()") >> Signed-off-by: YueHaibing > > Thanks; the patch isn't quite correct, though. This is what I merged > into my tree's version of the "save all error info..." commit. > > - Ted > Ok, good to know this and thansk! > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h > index eacd2f9cc833..91eb4381cae5 100644 > --- a/fs/ext4/ext4.h > +++ b/fs/ext4/ext4.h > @@ -2848,6 +2848,11 @@ do { \ > no_printk(fmt, ##__VA_ARGS__); \ > __ext4_error_inode(inode, "", 0, block, 0, " "); \ > } while (0) > +#define ext4_error_inode_err(inode, func, line, block, err, fmt, ...) \ > +do { \ > + no_printk(fmt, ##__VA_ARGS__); \ > + __ext4_error_inode(inode, "", 0, block, err, " "); \ > +} while (0) > #define ext4_error_file(file, func, line, block, fmt, ...) \ > do { \ > no_printk(fmt, ##__VA_ARGS__); \ > @@ -2858,10 +2863,15 @@ do { \ > no_printk(fmt, ##__VA_ARGS__); \ > __ext4_error(sb, "", 0, 0, 0, " "); \ > } while (0) > -#define ext4_abort(sb, fmt, ...) \ > +#define ext4_error_err(sb, err, fmt, ...) \ > +do { \ > + no_printk(fmt, ##__VA_ARGS__); \ > + __ext4_error(sb, "", 0, err, 0, " "); \ > +} while (0) > +#define ext4_abort(sb, err, fmt, ...) \ > do { \ > no_printk(fmt, ##__VA_ARGS__); \ > - __ext4_abort(sb, "", 0, " "); \ > + __ext4_abort(sb, "", 0, err, " "); \ > } while (0) > #define ext4_warning(sb, fmt, ...) \ > do { \ > > . >