Nice cleanups and bug fix. For the series: Reviewed-by: William Kucharski <william.kucharski@xxxxxxxxxx> > On Jul 10, 2020, at 2:26 PM, Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> wrote: > > As part of the THP work, I audited the callers of find_get_entry() and > found one bug and three opportunities for optimisation. Patch 2 is the > bugfix as it depends on using the same code as mincore_page(). > > I don't really like having find_get_swap_page() in mincore.c, but I > can't find anywhere better to put it. > > Matthew Wilcox (Oracle) (4): > mm: Factor find_get_swap_page out of mincore_page > mm: Use find_get_swap_page in memcontrol > mm: Optimise madvise WILLNEED > proc: Optimise smaps for shmem entries > > fs/proc/task_mmu.c | 8 +----- > include/linux/pagemap.h | 1 + > mm/madvise.c | 20 +++++++------- > mm/memcontrol.c | 25 ++--------------- > mm/mincore.c | 59 +++++++++++++++++++++++------------------ > 5 files changed, 47 insertions(+), 66 deletions(-) > > -- > 2.27.0 > >