diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2023-06-26 20:10:53 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 10:12:06 -0700 |
commit | f58d7907a39f8d0381db56af4a590915fd94ee58 (patch) | |
tree | c8802c4d2bc53c26dda9a7f457f2f4d914229984 /mm/memory-tiers.c | |
parent | b7b618da0edc85280e1c9c8f4f5239571e7c1d3e (diff) |
memory tier: use helper function destroy_memory_type()
Use helper function destroy_memory_type() to release memtype instead of
open code it to help improve code readability a bit. No functional change
intended.
Link: https://lkml.kernel.org/r/20230626121053.1916447-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Wei Xu <weixugc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory-tiers.c')
-rw-r--r-- | mm/memory-tiers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index a516e303e304..1719fa3bcf02 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -586,7 +586,7 @@ void clear_node_memory_type(int node, struct memory_dev_type *memtype) */ if (!node_memory_types[node].map_count) { node_memory_types[node].memtype = NULL; - kref_put(&memtype->kref, release_memtype); + destroy_memory_type(memtype); } mutex_unlock(&memory_tier_lock); } |