mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
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>
This commit is contained in:
parent
b7b618da0e
commit
f58d7907a3
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user