mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
mm/memcontrol: remove redundant NULL check
Fix below warnings reported by coccicheck: mm/memcontrol.c:451:3-9: WARNING: NULL check before some freeing functions is not needed. Link: https://lkml.kernel.org/r/1611216029-34397-1-git-send-email-abaci-bugfix@linux.alibaba.com Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com> Reported-by: Abaci Robot <abaci@linux.alibaba.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
802f1d522d
commit
8a260162f9
1 changed files with 1 additions and 2 deletions
|
@ -452,8 +452,7 @@ static void memcg_free_shrinker_maps(struct mem_cgroup *memcg)
|
|||
for_each_node(nid) {
|
||||
pn = mem_cgroup_nodeinfo(memcg, nid);
|
||||
map = rcu_dereference_protected(pn->shrinker_map, true);
|
||||
if (map)
|
||||
kvfree(map);
|
||||
kvfree(map);
|
||||
rcu_assign_pointer(pn->shrinker_map, NULL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue