Commit a1f10213 authored by Bob Liu's avatar Bob Liu Committed by Marek Szyprowski

mm: cma: alloc_contig_range: return early for err path

If start_isolate_page_range() failed, unset_migratetype_isolate() has been
done inside it.
Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
parent 5e97f3f9
...@@ -5825,7 +5825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, ...@@ -5825,7 +5825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
ret = start_isolate_page_range(pfn_max_align_down(start), ret = start_isolate_page_range(pfn_max_align_down(start),
pfn_max_align_up(end), migratetype); pfn_max_align_up(end), migratetype);
if (ret) if (ret)
goto done; return ret;
ret = __alloc_contig_migrate_range(&cc, start, end); ret = __alloc_contig_migrate_range(&cc, start, end);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment