diff options
| author | Xin Hao <[email protected]> | 2022-03-22 21:50:00 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2022-03-22 22:57:13 +0000 |
| commit | 15423a52cc84e23bc11e4a903cd775adc7c6ab00 (patch) | |
| tree | 59b4bfa0a9fcf0e56f343848d34e5d4db1b605dd | |
| parent | Docs/ABI/testing: add DAMON sysfs interface ABI document (diff) | |
| download | kernel-15423a52cc84e23bc11e4a903cd775adc7c6ab00.tar.gz kernel-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/[email protected]
Signed-off-by: Xin Hao <[email protected]>
Reviewed-by: SeongJae Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -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 = |
