* [3/3] {PREFIX:-x86_64}: Remove near all BUGs in mm/mempolicy.c
@ 2005-09-10 11:58 Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2005-09-10 11:58 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
Remove near all BUGs in mm/mempolicy.c
Most of them can never be triggered and were only for development.
Index: linux-2.6.13-work/mm/mempolicy.c
===================================================================
--- linux-2.6.13-work.orig/mm/mempolicy.c
+++ linux-2.6.13-work/mm/mempolicy.c
@@ -185,7 +185,6 @@ static struct zonelist *bind_zonelist(no
policy_zone = k;
}
}
- BUG_ON(num >= max);
zl->zones[num] = NULL;
return zl;
}
@@ -708,7 +707,6 @@ static unsigned interleave_nodes(struct
struct task_struct *me = current;
nid = me->il_next;
- BUG_ON(nid >= MAX_NUMNODES);
next = next_node(1+nid, policy->v.nodes);
if (next >= MAX_NUMNODES)
next = first_node(policy->v.nodes);
@@ -730,7 +728,6 @@ static unsigned offset_il_node(struct me
nid = next_node(nid+1, pol->v.nodes);
c++;
} while (c <= target);
- BUG_ON(nid >= MAX_NUMNODES);
return nid;
}
@@ -741,7 +738,6 @@ static struct page *alloc_page_interleav
struct zonelist *zl;
struct page *page;
- BUG_ON(!node_online(nid));
zl = NODE_DATA(nid)->node_zonelists + (gfp & GFP_ZONEMASK);
page = __alloc_pages(gfp, order, zl);
if (page && page_zone(page) == zl->zones[0]) {
@@ -784,8 +780,6 @@ alloc_page_vma(unsigned int __nocast gfp
unsigned nid;
if (vma) {
unsigned long off;
- BUG_ON(addr >= vma->vm_end);
- BUG_ON(addr < vma->vm_start);
off = vma->vm_pgoff;
off += (addr - vma->vm_start) >> PAGE_SHIFT;
nid = offset_il_node(pol, vma, off);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-10 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-10 11:58 [3/3] {PREFIX:-x86_64}: Remove near all BUGs in mm/mempolicy.c Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox