]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm/vmscan: __isolate_lru_page_prepare() cleanup
authorAlex Shi <alex.shi@linux.alibaba.com>
Wed, 24 Feb 2021 20:08:01 +0000 (12:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:33 +0000 (13:38 -0800)
commitc2135f7c570bc274035834848d9bf46ea89ba763
treea0536dce59674a2fc8c9a13dbb644cc43a52f2d4
parent7ecc956551f8a66618f71838c790a9b0b4f9ca10
mm/vmscan: __isolate_lru_page_prepare() cleanup

The function just returns 2 results, so using a 'switch' to deal with its
result is unnecessary.  Also simplify it to a bool func as Vlastimil
suggested.

Also remove 'goto' by reusing list_move(), and take Matthew Wilcox's
suggestion to update comments in function.

Link: https://lkml.kernel.org/r/728874d7-2d93-4049-68c1-dcc3b2d52ccd@linux.alibaba.com
Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swap.h
mm/compaction.c
mm/vmscan.c