* [PATCH] mm: cma: alloc_contig_range: return early for err path
@ 2012-10-23 6:45 Bob Liu
2012-10-23 6:55 ` Ni zhan Chen
2012-10-23 12:13 ` Marek Szyprowski
0 siblings, 2 replies; 3+ messages in thread
From: Bob Liu @ 2012-10-23 6:45 UTC (permalink / raw)
To: akpm
Cc: mgorman, minchan, m.szyprowski, kamezawa.hiroyu, mhocko,
linux-mm, Bob Liu
If start_isolate_page_range() failed, unset_migratetype_isolate() has been
done inside it.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bb90971..b0012ab 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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)
--
1.7.9.5
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: cma: alloc_contig_range: return early for err path
2012-10-23 6:45 [PATCH] mm: cma: alloc_contig_range: return early for err path Bob Liu
@ 2012-10-23 6:55 ` Ni zhan Chen
2012-10-23 12:13 ` Marek Szyprowski
1 sibling, 0 replies; 3+ messages in thread
From: Ni zhan Chen @ 2012-10-23 6:55 UTC (permalink / raw)
To: Bob Liu
Cc: akpm, mgorman, minchan, m.szyprowski, kamezawa.hiroyu, mhocko, linux-mm
On 10/23/2012 02:45 PM, Bob Liu wrote:
> If start_isolate_page_range() failed, unset_migratetype_isolate() has been
> done inside it.
>
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index bb90971..b0012ab 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -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.
>
> ret = __alloc_contig_migrate_range(&cc, start, end);
> if (ret)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: cma: alloc_contig_range: return early for err path
2012-10-23 6:45 [PATCH] mm: cma: alloc_contig_range: return early for err path Bob Liu
2012-10-23 6:55 ` Ni zhan Chen
@ 2012-10-23 12:13 ` Marek Szyprowski
1 sibling, 0 replies; 3+ messages in thread
From: Marek Szyprowski @ 2012-10-23 12:13 UTC (permalink / raw)
To: Bob Liu; +Cc: akpm, mgorman, minchan, kamezawa.hiroyu, mhocko, linux-mm
Hello,
On 10/23/2012 8:45 AM, Bob Liu wrote:
> If start_isolate_page_range() failed, unset_migratetype_isolate() has been
> done inside it.
>
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index bb90971..b0012ab 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -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
--
Marek Szyprowski
Samsung Poland R&D Center
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-23 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 6:45 [PATCH] mm: cma: alloc_contig_range: return early for err path Bob Liu
2012-10-23 6:55 ` Ni zhan Chen
2012-10-23 12:13 ` Marek Szyprowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox