Skip to contentSkip to conversation

mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 13

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: shmem: assign a lock class to the unused huge shrinklist
has been removed from the -mm tree. Its filename was
mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Qi Zheng <[email protected]>
Subject: mm: shmem: assign a lock class to the unused huge shrinklist
Date: Sun, 11 Oct 2026 12:59:56 +0800

The unused huge shrinklist shares the default list_lru lock class with the dentry LRU. Although they use distinct lock instances, lockdep conflates their dependencies and reports a circular locking dependency:

WARNING: possible circular locking dependency detected

Give the unused huge shrinklist a dedicated lock class to fix this false-positive lockdep warning.

Fixes b9b1861d4f7a ("mm: shmem: make unused huge shrinker memcg aware")
Cc Hugh Dickins <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Usama Arif <[email protected]>

---

 mm/shmem.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
mm/shmem.c renamed from mm/shmem.c~mm-shmem-assign-a-lock-class-to-the-unused-huge-shrinklist +5 -1
@@ -5160,6 +5160,9 @@ static const struct dentry_operations sh
 
 static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
 {
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+	static struct lock_class_key shmem_unused_huge_lock_key;
+#endif
 	struct shmem_options *ctx = fc->fs_private;
 	struct inode *inode;
 	struct shmem_sb_info *sbinfo;
@@ -5238,7 +5241,8 @@ static int shmem_fill_super(struct super
 		goto failed;
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
-	if (list_lru_init_memcg(&sbinfo->shrinklist, sb->s_shrink))
+	if (list_lru_init_memcg_key(&sbinfo->shrinklist, sb->s_shrink,
+				    &shmem_unused_huge_lock_key))
 		goto failed;
 #endif
 

_

Patches currently in -mm which might be from [email protected] are