From patchwork Mon May 15 13:44:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9727001 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 8B63F6028A for ; Mon, 15 May 2017 13:46:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B738285E7 for ; Mon, 15 May 2017 13:46:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F77C285EC; Mon, 15 May 2017 13:46:47 +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,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 4116B285E7 for ; Mon, 15 May 2017 13:46:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933608AbdEONqp (ORCPT ); Mon, 15 May 2017 09:46:45 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:60694 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933582AbdEONqo (ORCPT ); Mon, 15 May 2017 09:46:44 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MVYtf-1dVT7B3Q4t-00Z2Yf; Mon, 15 May 2017 15:45:26 +0200 From: Arnd Bergmann To: Dan Williams Cc: Jan Kara , Geert Uytterhoeven , linux-xfs@vger.kernel.org, "Darrick J . Wong" , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dax: hide block device code in #ifdef Date: Mon, 15 May 2017 15:44:00 +0200 Message-Id: <20170515134508.2713243-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:H4zknGhZlMUyz5IMg3/PBT9uWzq3CVMNhNnL9Z9xcnZi3FjWt0/ n6igmkBxDsBD4XpHLwO7dGDijz/CTdQNtbGkhplpz9VFB/aJbtf+HE/xei/QKPKc9sdDvAL ASTXqgjoNxVYGdlPCujavWob7jKJL5bXWFxaXKnb4Swo5jJXKDpMYTXKPCMgyf0wSNjTChf 1KP9sEwVsA8Z4Jtr4mLgQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:pvfv6cYJxMg=:nbYHn7A36QEIgMhddXUCfZ Bfn/gxAmJEtcy8GukkNsmoAgDFv0QJX0gZARw9ZCcPRiEuZCiPAryw31KuPgKHwcqQUyUzKno c9+Fu03CeCdKVQHGmRcTuMzqwvrz3u6FK4iS7GOl5kfan0r97Ktmr6vjyt0V0wgjVGGcHtP5b 5sf5rgktXMK0Ldc4AJKVsCseaS0cJJRVS9+HyzD8GNgsPu674nzhjOaB8yCPeCOhQ03YR0Jp7 FYB/bF3bo35ivYKSMOxr+ii+JckyC6f9nvSXQMHG+du5EvcwFHltTKSv0ZEVo7aa+gslM1MeH s0mzejS2zrdtj2I8eRjvPoYZUGouf2gavQSiUNhUT5vtFOUc/cLaRyzi/IdadvtReivcMp/Xl Vmqr7ovXny96hLdDHJ1Q+mIFXUVrK78TVqAoLnlP6jFHWdokrmt0pN3zl6Gh6NJwvyQKLoq1/ fAyKIpy677gQ5uyIR13AQKbm3bEUWMumWrVqQD9TlG9jnwks0xr+1fTMnEQoNuDaLAsnZMmpO 4XG8X3TxbYAHloob9VArafF1Pef+yaFyUiSeSnFn/ncoIzkS9pCCvV+8wBhdLcEgvddyarVPO CES3XZ0D9FsGI084octpyXs15v/CCr01rGZdlNlE2PHbj1JemBR3Ijel7biocb3EuID4oZAP/ N56Y2BuA7pl3xL0Iz7/HHFk4abMd+nFF0Q9LNnZaWO8XtnRQvq6IKDFmryorFHgIISDM= Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We allow configurations with CONFIG_BLOCK=n and CONFIG_DAX=y, which now results in a link error: drivers/dax/super.c: In function 'bdev_dax_pgoff': drivers/dax/super.c:50:26: error: implicit declaration of function 'get_start_sect'; did you mean 'get_task_cred'? [-Werror=implicit-function-declaration] The two obvious ways to avoid the link error are to either add an #ifdef around the code that was moved from fs/block_dev.c, or to disallow the configuration. I could not see if there is or is not a reason to support this combination of options, but in case there is, the #ifdef is the safer choice. Fixes: ef51042472f5 ("block, dax: move "select DAX" from BLOCK to FS_DAX") Signed-off-by: Arnd Bergmann Reviewed-by: Darrick J. Wong --- drivers/dax/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index ebf43f531ada..6ed32aac8bbe 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -44,6 +44,7 @@ void dax_read_unlock(int id) } EXPORT_SYMBOL_GPL(dax_read_unlock); +#ifdef CONFIG_BLOCK int bdev_dax_pgoff(struct block_device *bdev, sector_t sector, size_t size, pgoff_t *pgoff) { @@ -112,6 +113,7 @@ int __bdev_dax_supported(struct super_block *sb, int blocksize) return 0; } EXPORT_SYMBOL_GPL(__bdev_dax_supported); +#endif /** * struct dax_device - anchor object for dax services