mm/migrate.c: remove unnecessary rc != MIGRATEPAGE_SUCCESS check in 'else' case
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 5 May 2021 01:37:07 +0000 (18:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:24 +0000 (11:27 -0700)
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.

Link: https://lkml.kernel.org/r/20210325131524.48181-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Rafael Aquini <aquini@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c

index 1e1f832..896e9cd 100644 (file)
@@ -1348,7 +1348,7 @@ out_unlock:
 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);
 
        /*