-
- Downloads
mm: change to return bool for isolate_lru_page()
The isolate_lru_page() can only return 0 or -EBUSY, and most users did not care about the negative error of isolate_lru_page(), except one user in add_page_for_migration(). So we can convert the isolate_lru_page() to return a boolean value, which can help to make the code more clear when checking the return value of isolate_lru_page(). Also convert all users' logic of checking the isolation state. No functional changes intended. Link: https://lkml.kernel.org/r/3074c1ab628d9dbf139b33f248a8bc253a3f95f0.1676424378.git.baolin.wang@linux.alibaba.com Signed-off-by:Baolin Wang <baolin.wang@linux.alibaba.com> Acked-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by:
Linus Torvalds <torvalds@linux-foundation.org> Reviewed-by:
SeongJae Park <sj@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
Showing
- mm/folio-compat.c 3 additions, 9 deletionsmm/folio-compat.c
- mm/internal.h 1 addition, 1 deletionmm/internal.h
- mm/khugepaged.c 1 addition, 1 deletionmm/khugepaged.c
- mm/memcontrol.c 2 additions, 2 deletionsmm/memcontrol.c
- mm/memory-failure.c 2 additions, 2 deletionsmm/memory-failure.c
- mm/memory_hotplug.c 5 additions, 3 deletionsmm/memory_hotplug.c
- mm/migrate.c 6 additions, 3 deletionsmm/migrate.c
- mm/migrate_device.c 1 addition, 1 deletionmm/migrate_device.c
Loading
Please register or sign in to comment