diff options
author | Xin Hao <xhao@linux.alibaba.com> | 2022-03-23 00:50:00 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-23 01:57:13 +0300 |
commit | 15423a52cc84e23bc11e4a903cd775adc7c6ab00 (patch) | |
tree | 59b4bfa0a9fcf0e56f343848d34e5d4db1b605dd | |
parent | f968c6a4c66ec25e97ca8801eada103abfe9b295 (diff) | |
download | linux-15423a52cc84e23bc11e4a903cd775adc7c6ab00.tar.xz |
mm/damon/sysfs: remove repeat container_of() in damon_sysfs_kdamond_release()
In damon_sysfs_kdamond_release(), we have use container_of() to get
"kdamond" pointer, so there no need to get it once again.
Link: https://lkml.kernel.org/r/20220303075314.22502-1-xhao@linux.alibaba.com
Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/damon/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c index 58bcd2f5b02a..48e434cd43d8 100644 --- a/mm/damon/sysfs.c +++ b/mm/damon/sysfs.c @@ -2345,7 +2345,7 @@ static void damon_sysfs_kdamond_release(struct kobject *kobj) if (kdamond->damon_ctx) damon_destroy_ctx(kdamond->damon_ctx); - kfree(container_of(kobj, struct damon_sysfs_kdamond, kobj)); + kfree(kdamond); } static struct kobj_attribute damon_sysfs_kdamond_state_attr = |