lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: make reserve_bootmem can crossed the nodes
On Thu, 13 Mar 2008 16:45:42 -0700
"Yinghai Lu" <yhlu.kernel@gmail.com> wrote:
> int __init reserve_bootmem(unsigned long addr, unsigned long size,
> int flags)
> {
> - return reserve_bootmem_core(NODE_DATA(0)->bdata, addr, size, flags);
> + int ret;
> + bootmem_data_t *bdata;
> + list_for_each_entry(bdata, &bdata_list, list) {
> + ret = can_reserve_bootmem_core(bdata, addr, size, flags);
> + if (ret < 0)
> + return ret;
> + }
> + list_for_each_entry(bdata, &bdata_list, list)
> + reserve_bootmem_core(bdata, addr, size, flags);
> + return 0;
> }

why list_for_each twice ?

Thanks,
-Kame



\
 
 \ /
  Last update: 2008-03-14 02:33    [W:0.063 / U:4.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site