Linux filesystem development
 help / color / mirror / Atom feed
From: Kaitao Cheng <kaitao.cheng@linux.dev>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Dan Williams <djbw@kernel.org>,
	Matthew Wilcox <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>,
	linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Kaitao Cheng <chengkaitao@kylinos.cn>
Subject: [PATCH 1/2] fs/dax: Remove unused dax_layout_busy_page()
Date: Fri,  4 Sep 2026 23:27:48 +0800	[thread overview]
Message-ID: <20260904152749.84493-2-kaitao.cheng@linux.dev> (raw)
In-Reply-To: <20260904152749.84493-1-kaitao.cheng@linux.dev>

From: Kaitao Cheng <chengkaitao@kylinos.cn>

dax_layout_busy_page() used to let filesystems scan an entire DAX
mapping for pinned pages. All callers now use dax_break_layout(),
which also handles waiting for busy pages and deleting DAX mapping
entries once the range becomes idle.

The remaining function is only a wrapper around
dax_layout_busy_page_range() and has no in-tree users. Remove it
together with its declaration, !CONFIG_FS_DAX stub, and exported
symbol.

Signed-off-by: Kaitao Cheng <chengkaitao@kylinos.cn>
---
 fs/dax.c            | 6 ------
 include/linux/dax.h | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/fs/dax.c b/fs/dax.c
index dad4efea7964..1e19e4a354ce 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -841,12 +841,6 @@ struct page *dax_layout_busy_page_range(struct address_space *mapping,
 }
 EXPORT_SYMBOL_GPL(dax_layout_busy_page_range);
 
-struct page *dax_layout_busy_page(struct address_space *mapping)
-{
-	return dax_layout_busy_page_range(mapping, 0, LLONG_MAX);
-}
-EXPORT_SYMBOL_GPL(dax_layout_busy_page);
-
 static int __dax_invalidate_entry(struct address_space *mapping,
 				  pgoff_t index, bool trunc)
 {
diff --git a/include/linux/dax.h b/include/linux/dax.h
index fe6c3ded1b50..05e59e45a1c2 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -155,7 +155,6 @@ int dax_writeback_mapping_range(struct address_space *mapping,
 		struct dax_device *dax_dev, struct writeback_control *wbc);
 int dax_folio_reset_order(struct folio *folio);
 
-struct page *dax_layout_busy_page(struct address_space *mapping);
 struct page *dax_layout_busy_page_range(struct address_space *mapping, loff_t start, loff_t end);
 dax_entry_t dax_lock_folio(struct folio *folio);
 void dax_unlock_folio(struct folio *folio, dax_entry_t cookie);
@@ -173,11 +172,6 @@ static inline int fs_dax_get(struct dax_device *dax_dev, void *holder,
 {
 	return -EOPNOTSUPP;
 }
-static inline struct page *dax_layout_busy_page(struct address_space *mapping)
-{
-	return NULL;
-}
-
 static inline struct page *dax_layout_busy_page_range(struct address_space *mapping, pgoff_t start, pgoff_t nr_pages)
 {
 	return NULL;
-- 
2.50.1 (Apple Git-155)


  reply	other threads:[~2026-09-04 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 15:27 [PATCH 0/2] fs/dax: Clean up busy page lookup helpers Kaitao Cheng
2026-09-04 15:27 ` Kaitao Cheng [this message]
2026-09-05  2:03   ` [PATCH 1/2] fs/dax: Remove unused dax_layout_busy_page() Muchun Song
2026-09-04 15:27 ` [PATCH 2/2] fs/dax: Make dax_layout_busy_page_range() static Kaitao Cheng
2026-09-05  2:04   ` Muchun Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260904152749.84493-2-kaitao.cheng@linux.dev \
    --to=kaitao.cheng@linux.dev \
    --cc=brauner@kernel.org \
    --cc=chengkaitao@kylinos.cn \
    --cc=djbw@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=nvdimm@lists.linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox