From: Kaitao Cheng <kaitao.cheng@linux.dev>
To: Dan Williams <djbw@kernel.org>,
Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.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] fs/dax: Remove redundant deferred list initialization
Date: Thu, 3 Sep 2026 13:02:07 +0800 [thread overview]
Message-ID: <20260903050207.7015-1-kaitao.cheng@linux.dev> (raw)
From: Kaitao Cheng <chengkaitao@kylinos.cn>
prep_compound_page() calls prep_compound_head(), which initializes
folio->_deferred_list for compound folios with an order greater than one.
Therefore, dax_folio_init() initializes the list twice for large DAX
folios.
Remove the redundant initialization from dax_folio_init(). This leaves
the behavior unchanged and keeps compound folio initialization
centralized in prep_compound_head().
Signed-off-by: Kaitao Cheng <chengkaitao@kylinos.cn>
---
fs/dax.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 6ba50142eeb2..dad4efea7964 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -469,8 +469,6 @@ static void dax_folio_init(void *entry)
if (order > 0) {
prep_compound_page(&folio->page, order);
- if (order > 1)
- INIT_LIST_HEAD(&folio->_deferred_list);
WARN_ON_ONCE(folio_ref_count(folio));
}
}
--
2.50.1 (Apple Git-155)
next reply other threads:[~2026-09-03 5:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 5:02 Kaitao Cheng [this message]
2026-09-03 5:12 ` [PATCH] fs/dax: Remove redundant deferred list initialization sashiko-bot
2026-09-03 6:13 ` Muchun Song
2026-09-04 10:56 ` Christian Brauner
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=20260903050207.7015-1-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.