]> git.baikalelectronics.ru Git - kernel.git/commit
mm/slab_common.c: use list_for_each_entry in dump_unreclaimable_slab()
authorHui Su <sh_def@163.com>
Tue, 15 Dec 2020 03:03:47 +0000 (19:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:37 +0000 (12:13 -0800)
commit24371007a90919406effbe554edb542e3f2ef9e0
tree70b66cbd76071daddd130d6e33e9910cf783e167
parent742b7e0a40aa714262e2a1d383dfca3ab50bc3e8
mm/slab_common.c: use list_for_each_entry in dump_unreclaimable_slab()

dump_unreclaimable_slab() acquires the slab_mutex first, and it won't
remove any slab_caches list entry when itering the slab_caches lists.

Thus we do not need list_for_each_entry_safe here, which is against
removal of list entry.

Link: https://lkml.kernel.org/r/20200926043440.GA180545@rlk
Signed-off-by: Hui Su <sh_def@163.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab_common.c