mm-damon-tests-use-scoped_guard-for-damon_test_ops_registration.patch removed from -mm tree
The quilt patch titled
Subject: mm/damon/tests: use scoped_guard() for damon_test_ops_registration
has been removed from the -mm tree. Its filename was
mm-damon-tests-use-scoped_guard-for-damon_test_ops_registration.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: Jaeyeon Lee <[email protected]>
Subject: mm/damon/tests: use scoped_guard() for damon_test_ops_registration
Date: Mon, 31 Aug 2026 07:26:07 -0700
Replace manual mutex_lock() and mutex_unlock() calls with the scoped_guard() macro. This simplifies the code, improves readability, and ensures that the lock is automatically released when the scope ends, preventing potential lock leaks in the future.
---
mm/damon/tests/core-kunit.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
mm/damon/tests/core-kunit.h renamed from mm/damon/tests/core-kunit.h~mm-damon-tests-use-scoped_guard-for-damon_test_ops_registration +10 -11
@@ -441,17 +441,17 @@ static void damon_test_ops_registration(KUNIT_EXPECT_EQ (test,damon_select_ops (c,NR_DAMON_OPS ), -EINVAL );/* Registration should success after unregistration */ -mutex_lock (&damon_ops_lock); - bak = damon_registered_ops[DAMON_OPS_VADDR ]; - damon_registered_ops[DAMON_OPS_VADDR ] = (struct damon_operations ){}; -mutex_unlock (&damon_ops_lock); + scoped_guard(mutex, &damon_ops_lock) { + bak = damon_registered_ops[DAMON_OPS_VADDR ]; + damon_registered_ops[DAMON_OPS_VADDR ] = + (struct damon_operations ){}; + } ops.id =DAMON_OPS_VADDR ;KUNIT_EXPECT_EQ (test,damon_register_ops (&ops),0 ); -mutex_lock (&damon_ops_lock); - damon_registered_ops[DAMON_OPS_VADDR ] = bak; -mutex_unlock (&damon_ops_lock); + scoped_guard(mutex, &damon_ops_lock) + damon_registered_ops[DAMON_OPS_VADDR ] = bak;/* Check double-registration failure again */ KUNIT_EXPECT_EQ (test,damon_register_ops (&ops), -EINVAL );
@@ -459,10 +459,9 @@ static void damon_test_ops_registration(damon_destroy_ctx (c);if (need_cleanup) { -mutex_lock (&damon_ops_lock); - damon_registered_ops[DAMON_OPS_VADDR ] = - (struct damon_operations ){}; -mutex_unlock (&damon_ops_lock); + scoped_guard(mutex, &damon_ops_lock) + damon_registered_ops[DAMON_OPS_VADDR ] = + (struct damon_operations ){}; } }
_
Patches currently in -mm which might be from [email protected] are
selftests-mm-skip-khugepaged-file-tests-if-mkfsxfs-is-unavailable.patch selftests-mm-hugetlb-read-hwpoison-add-setup-of-hugetlb-pages.patch selftests-mm-hugetlb_madv_vs_map-fix-tap-plan-mismatches.patch