]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/khugepaged: refactor collapse_file control flow
authorDavid Stevens <stevensd@chromium.org>
Tue, 4 Apr 2023 12:01:15 +0000 (21:01 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:02:53 +0000 (16:02 -0700)
commitc1a0a543e5c996e54cf869a27c4967cf4b6b5f61
tree963feaf2ce1342cc512819a39f2067d209368dc2
parentad1b62f289addc77f43779ae5238f1d1ac718f9f
mm/khugepaged: refactor collapse_file control flow

Add a rollback label to deal with failure, instead of continuously
checking for RESULT_SUCCESS, to make it easier to add more failure cases.
The refactoring also allows the collapse_file tracepoint to include hpage
on success (instead of NULL).

Link: https://lkml.kernel.org/r/20230404120117.2562166-3-stevensd@google.com
Signed-off-by: David Stevens <stevensd@chromium.org>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jiaqi Yan <jiaqiyan@google.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/khugepaged.c