From patchwork Mon Sep 21 16:28:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 309374 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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 D4006C43469 for ; Mon, 21 Sep 2020 16:53:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 986712371F for ; Mon, 21 Sep 2020 16:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707214; bh=IMKosS4jtrY102X+h47hgsWXTzCkkvPOzN0nyzCo/OE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RpqulvsuvcStsUAFvygEzqS70/U+M58gGXfJeO9HBNRpfG5hvNxJ7oSD0Jkc+JZYj JUoXkcGM4ydHQe1lulQuGKKcpj4hIh3h+ViYIyItpa/2Bq8WCRbjg9GupjG8mrU15T Yk++sjM+e0CVfemJZ+0WoIFmSII+OJBlWhpB6mY0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729290AbgIUQr2 (ORCPT ); Mon, 21 Sep 2020 12:47:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:54268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728955AbgIUQrY (ORCPT ); Mon, 21 Sep 2020 12:47:24 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 275602223E; Mon, 21 Sep 2020 16:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706843; bh=IMKosS4jtrY102X+h47hgsWXTzCkkvPOzN0nyzCo/OE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nzXmq/n+RiFJ0CTJHu/qAdtSzq1G+USvBkrpCliY0vNMOBqv9fVX8EQDB2L1CkPAG jDaks8+ArcOjz2pxmOcM7QPnGOWzwR5kD0EgriU0/QFH6u3AYw//y+CEFKmkjg2d5R i7wr/ALAsu3sgAdsZGe3NiPNsH5hcHXrUvyY+0kk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Naresh Kamboju , kernel test robot , Jan Kara , Dan Williams Subject: [PATCH 5.8 116/118] dax: Fix compilation for CONFIG_DAX && !CONFIG_FS_DAX Date: Mon, 21 Sep 2020 18:28:48 +0200 Message-Id: <20200921162041.784022784@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jan Kara commit 88b67edd7247466bc47f01e1dc539b0d0d4b931e upstream. dax_supported() is defined whenever CONFIG_DAX is enabled. So dummy implementation should be defined only in !CONFIG_DAX case, not in !CONFIG_FS_DAX case. Fixes: e2ec51282545 ("dm: Call proper helper to determine dax support") Cc: Reported-by: Geert Uytterhoeven Reported-by: Naresh Kamboju Reported-by: kernel test robot Signed-off-by: Jan Kara Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman --- include/linux/dax.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -58,6 +58,8 @@ static inline void set_dax_synchronous(s { __set_dax_synchronous(dax_dev); } +bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, + int blocksize, sector_t start, sector_t len); /* * Check if given mapping is supported by the file / underlying device. */ @@ -104,6 +106,12 @@ static inline bool dax_synchronous(struc static inline void set_dax_synchronous(struct dax_device *dax_dev) { } +static inline bool dax_supported(struct dax_device *dax_dev, + struct block_device *bdev, int blocksize, sector_t start, + sector_t len) +{ + return false; +} static inline bool daxdev_mapping_supported(struct vm_area_struct *vma, struct dax_device *dax_dev) { @@ -130,8 +138,6 @@ static inline bool generic_fsdax_support return __generic_fsdax_supported(dax_dev, bdev, blocksize, start, sectors); } -bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, - int blocksize, sector_t start, sector_t len); static inline void fs_put_dax(struct dax_device *dax_dev) { @@ -158,13 +164,6 @@ static inline bool generic_fsdax_support { return false; } - -static inline bool dax_supported(struct dax_device *dax_dev, - struct block_device *bdev, int blocksize, sector_t start, - sector_t len) -{ - return false; -} static inline void fs_put_dax(struct dax_device *dax_dev) {