diff options
author | Andrea Arcangeli <andrea@novell.com> | 2004-11-18 22:52:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-18 22:52:51 -0800 |
commit | b14d8791b9c44c91ba097e3b742a6544be8c6838 (patch) | |
tree | 5b570d90d0bcf04a3eb152704dbd96dd284bba7e /mm | |
parent | fc2219b2156b88f75688a4512f19a7c3d7bb4da9 (diff) | |
download | history-b14d8791b9c44c91ba097e3b742a6544be8c6838.tar.gz |
[PATCH] mempolicy can select the wrong policy
mempolicy.c code will return the wrong policy in some cases.
Signed-off-by: Andrea Arcangeli <andrea@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mempolicy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 91be0f626d7f7d..edda085961df3f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -900,13 +900,13 @@ sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end) while (n) { struct sp_node *p = rb_entry(n, struct sp_node, nd); - if (start >= p->end) { + + if (start >= p->end) n = n->rb_right; - } else if (end < p->start) { + else if (end <= p->start) n = n->rb_left; - } else { + else break; - } } if (!n) return NULL; |