Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1972355rwl; Thu, 5 Jan 2023 23:30:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtKbIvybCCs1chghIoHoIqe9Hq1hkM6PGMMtstpcVwGTY6qQPLShK+/l85pWSIa971ICHsO X-Received: by 2002:a17:90a:6e0b:b0:219:d72:2ea5 with SMTP id b11-20020a17090a6e0b00b002190d722ea5mr55092084pjk.2.1672990213248; Thu, 05 Jan 2023 23:30:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672990213; cv=none; d=google.com; s=arc-20160816; b=V/btgqaRaB4HWkkQO6m2nyAa7bOvrM7zWZ9EERlfK1uH69Iy3LCibz+C2lqzlEpdYV kUp+tPVKzCGIvsr9qv3/i0Sbq3tEYe+AHivNeWmlwDkKzHzu9JfhKcdFQUfWBhl9JbIK HCT0zXLlkCK9tkpeJS5TyHLDLsfaH6UFwIkDBk5zfoetqCTXr+LllOlUGYHp9fSOf0Rv 1+IXVM3bvZumxCeQyIVK5woq7mnNAAaD8OO7nl7R5og/n2c/Wmw6vks/WA93HfKyca0R ft6YsqphWlN5gvsQH5oXM22tVP4GJzvdqPvzGYNdSM45wix/sTTbO3p0I/bUBPEyij6g 8MdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=iUVmcm7IiGcBMGMaICLwEGWoM1ev3G1SVIsCb0MagDQ=; b=Ou264DnKVDopmTWpQ9E6qnCqYkkvnr3pr+vF/YJDKwC5iWdSAQi+5FkVykVYDeVSYo /6fnjrg1zO+JvAhUtVcDZDla6H+H9JWE1YGbtaI+2L80RhrDqcXxqmOEWJspRaJxn6TD NkDMXmbFWaHszVTEBiUvBeFeIVwzSj7plVCB9tTQ41q/nMprYk/iaS4Wf9HzLuWE8V/U opXGyW+xpNwBlJcIxWp8OKvznO24ICMCcPhXRE1QCB9eKJLDok0bGoW4U7BSoN5kAcF3 aIV2lxAUntdyxrnnjBYpghktCfox/x0J0VV8VpK6QTrV4wcdR2fRoD05zD6mbs7H4o2G 96UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020a17090ab31800b0022601981ba2si4161228pjr.99.2023.01.05.23.30.05; Thu, 05 Jan 2023 23:30:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231861AbjAFHNQ (ORCPT + 54 others); Fri, 6 Jan 2023 02:13:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbjAFHNO (ORCPT ); Fri, 6 Jan 2023 02:13:14 -0500 Received: from mailgw.kylinos.cn (unknown [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65E221C93F; Thu, 5 Jan 2023 23:13:11 -0800 (PST) X-UUID: 7bcef3320e994e34849fc23b68676534-20230106 X-CPASD-INFO: c7c3ec4c5dbe43b4b1aa105324b6c6db@rIedU5KVYpNhhKSxg3atboJikZFhXFW CdG6CZpFmkIKVhH5xTV5nX1V9gnNXZF5dXFV3dnBQYmBhXVJ3i3-XblBgXoZgUZB3snmdU5WRZA== X-CLOUD-ID: c7c3ec4c5dbe43b4b1aa105324b6c6db X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,OB:0.0,URL:-5,TVAL:184. 0,ESV:0.0,ECOM:-5.0,ML:0.0,FD:0.0,CUTS:99.0,IP:-2.0,MAL:-5.0,PHF:-5.0,PHC:-5. 0,SPF:4.0,EDMS:-5,IPLABEL:4480.0,FROMTO:0,AD:0,FFOB:0.0,CFOB:0.0,SPC:0,SIG:-5 ,AUF:0,DUF:11763,ACD:194,DCD:194,SL:0,EISP:0,AG:0,CFC:0.604,CFSR:0.046,UAT:0, RAF:0,IMG:-5.0,DFA:0,DTA:0,IBL:-2.0,ADI:-5,SBL:0,REDM:0,REIP:0,ESB:0,ATTNUM:0 ,EAF:0,CID:-5.0,VERSION:2.3.17 X-CPASD-ID: 7bcef3320e994e34849fc23b68676534-20230106 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1 X-UUID: 7bcef3320e994e34849fc23b68676534-20230106 X-User: oushixiong@kylinos.cn Received: from localhost.localdomain [(116.128.244.169)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1714674557; Fri, 06 Jan 2023 15:13:10 +0800 From: oushixiong To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, oushixiong , k2ci Subject: [PATCH] fs/coredump: fix a compilation issue Date: Fri, 6 Jan 2023 15:13:04 +0800 Message-Id: <20230106071304.1258905-1-oushixiong@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org if CONFIG_ELF_CORE is not set, it will cause a compilation issue: error: ‘dump_emit_page’ defined but not used. Fixes: 06bbaa6dc53c "[coredump] don't use __kernel_write()" Reported-by: k2ci Signed-off-by: oushixiong --- fs/coredump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/coredump.c b/fs/coredump.c index de78bde2991b..95390a73b912 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -838,6 +838,7 @@ static int __dump_skip(struct coredump_params *cprm, size_t nr) } } +#ifdef CONFIG_ELF_CORE static int dump_emit_page(struct coredump_params *cprm, struct page *page) { struct bio_vec bvec = { @@ -870,6 +871,7 @@ static int dump_emit_page(struct coredump_params *cprm, struct page *page) return 1; } +#endif int dump_emit(struct coredump_params *cprm, const void *addr, int nr) { -- 2.25.1