]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory_hotplug: fix potential permanent lru cache disable
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 25 Aug 2021 19:17:55 +0000 (12:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 Aug 2021 19:25:12 +0000 (12:25 -0700)
commit946746d1ad921e5f493b536533dda02ea22ca609
tree9ca898b863876fdd2ba084f670587b7c1f4ff2ee
parent6e764bcd1cf72a2846c0e53d3975a09b242c04c9
mm/memory_hotplug: fix potential permanent lru cache disable

If offline_pages failed after lru_cache_disable(), it forgot to do
lru_cache_enable() in error path.  So we would have lru cache disabled
permanently in this case.

Link: https://lkml.kernel.org/r/20210821094246.10149-3-linmiaohe@huawei.com
Fixes: d479960e44f2 ("mm: disable LRU pagevec during the migration temporarily")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Chris Goldsworthy <cgoldswo@codeaurora.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c