Message ID | 20220817081408.513338-9-ying.huang@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [-V3,1/8] migrate: fix syscall move_pages() return value for failure | expand |
diff --git a/mm/migrate.c b/mm/migrate.c index 55fbf9669431..06a653977835 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1522,7 +1522,7 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page, case -EAGAIN: if (is_thp) thp_retry++; - else + else if (!no_subpage_counting) retry++; nr_retry_pages += nr_subpages; break; @@ -1548,8 +1548,7 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page, } } } - if (!no_subpage_counting) - nr_failed += retry; + nr_failed += retry; nr_thp_failed += thp_retry; nr_failed_pages += nr_retry_pages; /*