Message ID | 20210323135405.65059-3-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Cleanup and fixup for mm/migrate.c | expand |
On Tue, Mar 23, 2021 at 6:54 AM Miaohe Lin <linmiaohe@huawei.com> wrote: > > It's guaranteed that in the 'else' case of the rc == MIGRATEPAGE_SUCCESS > check, rc does not equal to MIGRATEPAGE_SUCCESS. Remove this unnecessary > check. Reviewed-by: Yang Shi <shy828301@gmail.com> > > Reviewed-by: David Hildenbrand <david@redhat.com> > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > --- > mm/migrate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/migrate.c b/mm/migrate.c > index facec65c7374..97da1fabdf72 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -1374,7 +1374,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page, > out: > if (rc == MIGRATEPAGE_SUCCESS) > putback_active_hugepage(hpage); > - else if (rc != -EAGAIN && rc != MIGRATEPAGE_SUCCESS) > + else if (rc != -EAGAIN) > list_move_tail(&hpage->lru, ret); > > /* > -- > 2.19.1 >
diff --git a/mm/migrate.c b/mm/migrate.c index facec65c7374..97da1fabdf72 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1374,7 +1374,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page, out: if (rc == MIGRATEPAGE_SUCCESS) putback_active_hugepage(hpage); - else if (rc != -EAGAIN && rc != MIGRATEPAGE_SUCCESS) + else if (rc != -EAGAIN) list_move_tail(&hpage->lru, ret); /*