Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1825520pxb; Mon, 23 Aug 2021 05:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqEESNJBqN+P50gL6wjs26lQGoN1gzv4BbVFzOIWP6qZ9Yp1enEiQkSpZNgYLww6QPaUqf X-Received: by 2002:a05:6e02:f08:: with SMTP id x8mr21814077ilj.92.1629722593816; Mon, 23 Aug 2021 05:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629722593; cv=none; d=google.com; s=arc-20160816; b=EBMQwagH4AOnDBdUMRwPZfsWFVGru9Ed4hlYxshQHAh1+sVvJcOJfFoCDZQQ0gBCoM cLQ7rhCpHR5KJHIpCXxOSAcMJMtlKsMbiN5T3xcwc4tWO86jw/AWNYVoWhUc0bPRa1Ma zI+NdJDa+mf4Z+0CyOCSaiZo7BMIV3cuFCm/07OW1fcjDT1KQSrJVf4dw3OKpJ+o3eEL C3fRWjFexy7i9V/7JUIGLHKyAbFEftQE9eVPYBhoi2Z2y5nI3I6DEmnujss5dBAAK6s1 mMPU5IrDmQ4ZY8rE5Sm5GIxcNt+I6fM9oTNKlUL02XokGwEOtx8D1G9GWsz8E8+gW4p3 fruw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5wCAc1UigPg83bYAOPKIh03rONFurX2QJOPBFrqOt18=; b=MRHHC7Ehy5zY6fpsy2OOUVAZRDrmKueesKs718zzyycEYwAori6k4LTp7xtGO7618+ 9pVSojehLyCnD61T7OHR2qNYwNRVd7rwHH4kEsSORCbTSgud3P2/5fM3aIZKc1i0iw0k I6hBtMArbS9AJQUalNloRqHdQxHxH/F/SUqtg3b+IZ190gr9CEYF4kFxNlMIWWznMRDx N++oumPgbJuLBRuVdJ3cLbFn2M12Kk3rZHhyO2eaFpgyVaRhjg1jj3UKj0wL3ID833mc vmIuxoXWavpVonEZzJJV9MwJrHQEkNIGRkoNif8SlAV7VK4yVQeXmTqeB+MRiIwyac7d x5BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ApPcK6u+; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si10441627ilg.86.2021.08.23.05.42.59; Mon, 23 Aug 2021 05:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ApPcK6u+; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237034AbhHWMnY (ORCPT + 99 others); Mon, 23 Aug 2021 08:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236937AbhHWMnY (ORCPT ); Mon, 23 Aug 2021 08:43:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22464C061575; Mon, 23 Aug 2021 05:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=5wCAc1UigPg83bYAOPKIh03rONFurX2QJOPBFrqOt18=; b=ApPcK6u+P+2G58ttWAohDIRExJ ZkLPdCqbsS3mDMgB2Rem97WENKK4A9V64ps9JC+6tsRb0CeBlmszdVNsUxngiXq4/sLLB6WkdVtkQ MOM5i64BZF0q8Y4YkzWhnSEZJ7fBU9TfXKd4/SLhzEtB0Pk+oO0phR1kBqKfnFsvTYmVJg6T2QD2b meZ7CFMAwGF0zECawe56cHWZEp/lcn1ybnKWKw9aDXeasgrbNc573j0iSNIWuxOAEo8Q3Bw56ZPt6 rmDi4wsIK7I+6nqdxl72l25a+0Sw9aLJFTaFOjlFWUciGjQYEUyr3ZQ5b/daWS5LFXDgavuB/sP/F fIqV391A==; Received: from [2001:4bb8:193:fd10:c6e8:3c08:6f8b:cbf0] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mI9Eo-009jGx-3q; Mon, 23 Aug 2021 12:40:17 +0000 From: Christoph Hellwig To: Dan Williams , Vishal Verma , Dave Jiang Cc: Mike Snitzer , Matthew Wilcox , linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: [PATCH 6/9] dax: remove __generic_fsdax_supported Date: Mon, 23 Aug 2021 14:35:13 +0200 Message-Id: <20210823123516.969486-7-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210823123516.969486-1-hch@lst.de> References: <20210823123516.969486-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Just implement generic_fsdax_supported directly out of line instead of adding a wrapper. Given that generic_fsdax_supported is only supplied for CONFIG_FS_DAX builds this also allows to not provide it at all for !CONFIG_FS_DAX builds. Signed-off-by: Christoph Hellwig --- drivers/dax/super.c | 8 ++++---- include/linux/dax.h | 16 ++-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 0f74f83101ab..8e8ccb3e956b 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -119,9 +119,8 @@ struct dax_device *fs_dax_get_by_bdev(struct block_device *bdev) return dax_get_by_host(bdev->bd_disk->disk_name); } EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev); -#endif -bool __generic_fsdax_supported(struct dax_device *dax_dev, +bool generic_fsdax_supported(struct dax_device *dax_dev, struct block_device *bdev, int blocksize, sector_t start, sector_t sectors) { @@ -201,7 +200,8 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev, } return true; } -EXPORT_SYMBOL_GPL(__generic_fsdax_supported); +EXPORT_SYMBOL_GPL(generic_fsdax_supported); +#endif /* CONFIG_FS_DAX */ /** * __bdev_dax_supported() - Check if the device supports dax for filesystem @@ -360,7 +360,7 @@ bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, return false; id = dax_read_lock(); - if (dax_alive(dax_dev)) + if (dax_alive(dax_dev) && dax_dev->ops->dax_supported) ret = dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, start, len); dax_read_unlock(id); diff --git a/include/linux/dax.h b/include/linux/dax.h index 379739b55408..0a3ef9701e03 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -123,16 +123,9 @@ static inline bool bdev_dax_supported(struct block_device *bdev, int blocksize) return __bdev_dax_supported(bdev, blocksize); } -bool __generic_fsdax_supported(struct dax_device *dax_dev, +bool generic_fsdax_supported(struct dax_device *dax_dev, struct block_device *bdev, int blocksize, sector_t start, sector_t sectors); -static inline bool generic_fsdax_supported(struct dax_device *dax_dev, - struct block_device *bdev, int blocksize, sector_t start, - sector_t sectors) -{ - return __generic_fsdax_supported(dax_dev, bdev, blocksize, start, - sectors); -} static inline void fs_put_dax(struct dax_device *dax_dev) { @@ -154,12 +147,7 @@ static inline bool bdev_dax_supported(struct block_device *bdev, return false; } -static inline bool generic_fsdax_supported(struct dax_device *dax_dev, - struct block_device *bdev, int blocksize, sector_t start, - sector_t sectors) -{ - return false; -} +#define generic_fsdax_supported NULL static inline void fs_put_dax(struct dax_device *dax_dev) { -- 2.30.2