mm: cma: alloc_contig_range: return early for err path
Subsystems (2)
PATCH 1/1 mm: cma: alloc_contig_range: return early for err path
If start_isolate_page_range() failed, unset_migratetype_isolate() has been done inside it.
--- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
@@ -5825,7 +5825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, ret =start_isolate_page_range (pfn_max_align_down (start),pfn_max_align_up (end), migratetype);if (ret) - goto done; +return ret; ret =__alloc_contig_migrate_range (&cc, start, end);if (ret)
Signature · 8 lines
1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 13 lines · Bob Liu
If
start_isolate_page_range()failed,unset_migratetype_isolate()has been done inside it.Signed-off-by Bob Liu <[email protected]>--- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/page_alloc.c +0
-0
mm/page_alloc.c int alloc_contig_range(unsigned long start, unsigned long end, · line 5828
Quoted 5 lines
mm/page_alloc.c +1
-1@@ -5825,7 +5825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, ret =start_isolate_page_range (pfn_max_align_down (start),pfn_max_align_up (end), migratetype);if (ret) - goto done; +return ret;
looks reasonable to me.
mm/page_alloc.c int alloc_contig_range(unsigned long start, unsigned long end, · line 5831
Quoted 3 lines
mm/page_alloc.c +0
-0ret =__alloc_contig_migrate_range (&cc, start, end);if (ret)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Hello,
Quoted 14 lines · Bob Liu
If
start_isolate_page_range()failed,unset_migratetype_isolate()has been done inside it.Signed-off-by Bob Liu <[email protected]>--- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/page_alloc.c +0
-0
mm/page_alloc.c int alloc_contig_range(unsigned long start, unsigned long end, · line 5831
Quoted 8 lines
mm/page_alloc.c +1
-1@@ -5825,7 +5825,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, ret =start_isolate_page_range (pfn_max_align_down (start),pfn_max_align_up (end), migratetype);if (ret) - goto done; +return ret; ret =__alloc_contig_migrate_range (&cc, start, end);if (ret)
Thanks for the fix, I've applied it to my kernel tree.
Best regards
Signature · 8 lines
Marek Szyprowski Samsung Poland R&D Center -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>