Skip to contentSkip to conversation

mm-damon-simply-damon_ctx-check-in-damon_sysfs_before_terminate.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 3, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/damon: simplify damon_ctx check in damon_sysfs_before_terminate
has been removed from the -mm tree. Its filename was
mm-damon-simply-damon_ctx-check-in-damon_sysfs_before_terminate.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: Xin Hao <[email protected]>
Subject: mm/damon: simplify damon_ctx check in damon_sysfs_before_terminate
Date: Wed, 7 Sep 2022 16:41:16 +0800

In damon_sysfs_before_terminate(), it needs to check whether ctx->ops.id supports 'DAMON_OPS_VADDR' or 'DAMON_OPS_FVADDR', there we can use damon_target_has_pid() instead.

---

 mm/damon/sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-simply-damon_ctx-check-in-damon_sysfs_before_terminate +1 -1
@@ -2309,7 +2309,7 @@ static void damon_sysfs_before_terminate
 {
 	struct damon_target *t, *next;
 
-	if (ctx->ops.id != DAMON_OPS_VADDR && ctx->ops.id != DAMON_OPS_FVADDR)
+	if (!damon_target_has_pid(ctx))
 		return;
 
 	mutex_lock(&ctx->kdamond_lock);

_

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

mm-damon-move-sz_damon_region-to-damon_sz_region.patch mm-damon-use-damon_sz_region-in-appropriate-place.patch