diff options
author | 2022-03-22 14:50:00 -0700 | |
---|---|---|
committer | 2022-03-22 15:57:13 -0700 | |
commit | 15423a52cc84e23bc11e4a903cd775adc7c6ab00 (patch) | |
tree | 59b4bfa0a9fcf0e56f343848d34e5d4db1b605dd /mm/damon | |
parent | Docs/ABI/testing: add DAMON sysfs interface ABI document (diff) | |
download | linux-15423a52cc84e23bc11e4a903cd775adc7c6ab00.tar.gz linux-15423a52cc84e23bc11e4a903cd775adc7c6ab00.tar.bz2 linux-15423a52cc84e23bc11e4a903cd775adc7c6ab00.zip |
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>
Diffstat (limited to 'mm/damon')
-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 = |