All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/dax: Remove redundant deferred list initialization
@ 2026-09-03  5:02 Kaitao Cheng
  2026-09-03  5:12 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kaitao Cheng @ 2026-09-03  5:02 UTC (permalink / raw)
  To: Dan Williams, Matthew Wilcox, Jan Kara, Alexander Viro,
	Christian Brauner
  Cc: Muchun Song, linux-fsdevel, nvdimm, linux-kernel, Kaitao Cheng

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)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-04 10:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03  5:02 [PATCH] fs/dax: Remove redundant deferred list initialization Kaitao Cheng
2026-09-03  5:12 ` sashiko-bot
2026-09-03  6:13 ` Muchun Song
2026-09-04 10:56 ` Christian Brauner

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.