Commit fa1df3f
mm: migrate: remove isolated variable in add_page_for_migration()
Directly check the return of isolate_hugetlb() and folio_isolate_lru() to
remove isolated variable, also setup err = -EBUSY in advance before
isolation, and update err only when successfully queued for migration,
which could help us to unify and simplify code a bit.
Link: https://lkml.kernel.org/r/20230913095131.2426871-9-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent b426ed7 commit fa1df3f
1 file changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2062 | 2062 | | |
2063 | 2063 | | |
2064 | 2064 | | |
2065 | | - | |
2066 | 2065 | | |
2067 | 2066 | | |
2068 | 2067 | | |
| |||
2095 | 2094 | | |
2096 | 2095 | | |
2097 | 2096 | | |
| 2097 | + | |
2098 | 2098 | | |
2099 | | - | |
2100 | | - | |
| 2099 | + | |
| 2100 | + | |
2101 | 2101 | | |
2102 | | - | |
2103 | | - | |
2104 | | - | |
| 2102 | + | |
2105 | 2103 | | |
2106 | | - | |
2107 | 2104 | | |
2108 | 2105 | | |
2109 | 2106 | | |
| |||
0 commit comments