Message ID | 20160721120824.2797655-1-arnd@arndb.de (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show
Return-Path: <xfs-bounces@oss.sgi.com> 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 D0C63602F0 for <patchwork-xfs@patchwork.kernel.org>; Thu, 21 Jul 2016 12:08:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C163A20649 for <patchwork-xfs@patchwork.kernel.org>; Thu, 21 Jul 2016 12:08:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B517527E66; Thu, 21 Jul 2016 12:08: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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F3AC20649 for <patchwork-xfs@patchwork.kernel.org>; Thu, 21 Jul 2016 12:08:50 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id 5F6F67CA1; Thu, 21 Jul 2016 07:08:49 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 10A057CA0 for <xfs@oss.sgi.com>; Thu, 21 Jul 2016 07:08:47 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay1.corp.sgi.com (Postfix) with ESMTP id C62AF8F804B for <xfs@oss.sgi.com>; Thu, 21 Jul 2016 05:08:43 -0700 (PDT) X-ASG-Debug-ID: 1469102920-04cbb057463a410001-NocioJ Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by cuda.sgi.com with ESMTP id WS6nPWkWh5BFWSt8 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <xfs@oss.sgi.com>; Thu, 21 Jul 2016 05:08:41 -0700 (PDT) X-Barracuda-Envelope-From: arnd@arndb.de X-Barracuda-Effective-Source-IP: mout.kundenserver.de[217.72.192.75] X-Barracuda-Apparent-Source-IP: 217.72.192.75 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0LnjcV-1aqZRB2CQp-00huU7; Thu, 21 Jul 2016 14:08:30 +0200 From: Arnd Bergmann <arnd@arndb.de> To: Dave Chinner <david@fromorbit.com>, xfs@oss.sgi.com Subject: [PATCH] xfs: remove dax code from object file when disabled Date: Thu, 21 Jul 2016 14:07:50 +0200 X-ASG-Orig-Subj: [PATCH] xfs: remove dax code from object file when disabled Message-Id: <20160721120824.2797655-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:274Bj9So4L3Aux6Cao7l8PVTiviPFC6u86QegB/oCYC7RFJY7v0 1hq/vwd7j/N+360zT1e22q25tWZC257SEogCY3cUbQgiDflBQs2zS4hScF1xc59Azbtl0L3 oq+BO8ns+RnLbigpmktnspMsLZ97VMvjetSHFd9KjVKWJ1s1rDqyBv1ngoHShahBNyMW9qf 1+8gzLNpsAfpxOC8h4Yjg== X-UI-Out-Filterresults: notjunk:1; V01:K0:/i8FhNQdR1Q=:iDEHK0OLK7Tl3MB7Q0rGwh aghrkm0eBkOdXrZN9ctcoNMiZe5bjU1WJ8+K5ed/xCMW2V5B+pn0dBT0MSWfTX/kDRBeC+bWp U0hogpvgwiGkaWPowWp74JqGVykvKJOVmJKfe8CzNugp+Ac/eCythU+wefLDjV4fFUmNlBTts zU2sCNWpZfNUVfv/ySX5+1fZW2feeXEFu4/TBF+spIpcKR3M9c2aX9uv+BKEnmLTHJuJrcQAZ m3VtFWLbIhuQq+quHXad5hRr92GAZ47GRricRkEUyb2SXKnd3fHcecnAa9gMeRnWUox0vB1Rl PV/qeTdWCyDfqBm2dzaJZDSfQ08momCrHeDZkL92kXtlB0U3OxQPSYr/o0JeAb7LXc8nfAeS3 QQAf/SLeh34xVyNNjYt3UpRHB/O3nlr+Luq2vMU9rb3dwdIuT3ApY/M8kb2w5MTs1TF6nNzgk x96AHGOUHVhk3Qrx8jVHmdha+3Ti72Y37JwXZqG8uSMcCrT1PdDYD5TcU0VvcsaRYEXU8jKe+ r2o1Q7f3uII+DtEGqpQ/gnDb409Gj6DwG4QRICFmin/R7Rps+OPoqIHNH82aGMHE36j257m6s njZtAkn0NhYnvDa5Ynr3GYatGhAdJGTgJUMMmihZl4Kg+t2onhpPzP/BUsOPurWmZC5tPRg9v gvFrpu/EbmgDdQUeDvigvycHw7IdYjSzQa91+LjpsrXdxqdBSjwpwjCzWHpgg7M51sSA= X-Barracuda-Connect: mout.kundenserver.de[217.72.192.75] X-Barracuda-Start-Time: 1469102921 X-Barracuda-Encrypted: DHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://192.48.176.25:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1493 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31422 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header Cc: Eric Sandeen <sandeen@redhat.com>, Arnd Bergmann <arnd@arndb.de>, Brian Foster <bfoster@redhat.com>, linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>, Matthew Wilcox <willy@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org>, Ross Zwisler <ross.zwisler@linux.intel.com> X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI <xfs.oss.sgi.com> List-Unsubscribe: <http://oss.sgi.com/mailman/options/xfs>, <mailto:xfs-request@oss.sgi.com?subject=unsubscribe> List-Archive: <http://oss.sgi.com/pipermail/xfs> List-Post: <mailto:xfs@oss.sgi.com> List-Help: <mailto:xfs-request@oss.sgi.com?subject=help> List-Subscribe: <http://oss.sgi.com/mailman/listinfo/xfs>, <mailto:xfs-request@oss.sgi.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP |
Thanks Arnd,
this looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 8ffacb8bba19..ed95e5bb04e6 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -327,7 +327,7 @@ xfs_file_dio_aio_read( return ret; } -STATIC ssize_t +static noinline ssize_t xfs_file_dax_read( struct kiocb *iocb, struct iov_iter *to) @@ -706,7 +706,7 @@ out: return ret; } -STATIC ssize_t +static noinline ssize_t xfs_file_dax_write( struct kiocb *iocb, struct iov_iter *from)
We check IS_DAX(inode) before calling either xfs_file_dax_read or xfs_file_dax_write, and this will lead the call being optimized out at compile time when CONFIG_FS_DAX is disabled. However, the two functions are marked STATIC, so they become global symbols when CONFIG_XFS_DEBUG is set, leaving us with two unused global functions that call into an undefined function and a broken "allmodconfig" build: fs/built-in.o: In function `xfs_file_dax_read': fs/xfs/xfs_file.c:348: undefined reference to `dax_do_io' fs/built-in.o: In function `xfs_file_dax_write': fs/xfs/xfs_file.c:758: undefined reference to `dax_do_io' Marking the two functions 'static noinline' instead of 'STATIC' will let the compiler drop the symbols when there are no callers but avoid the implicit inlining. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 16d4d43595b4 ("xfs: split direct I/O and DAX path") --- fs/xfs/xfs_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)