diff options
author | Nick Piggin <npiggin@suse.de> | 2006-01-18 17:42:27 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 19:20:17 -0800 |
commit | 053837fce7aa79025ed57656855df09f80175527 (patch) | |
tree | 05d7615894131a368fc4943f641b11acdd2ae694 /include/linux/mm_inline.h | |
parent | e236a166b2bc437769a9b8b5d19186a3761bde48 (diff) | |
download | op-kernel-dev-053837fce7aa79025ed57656855df09f80175527.zip op-kernel-dev-053837fce7aa79025ed57656855df09f80175527.tar.gz |
[PATCH] mm: migration page refcounting fix
Migration code currently does not take a reference to target page
properly, so between unlocking the pte and trying to take a new
reference to the page with isolate_lru_page, anything could happen to
it.
Fix this by holding the pte lock until we get a chance to elevate the
refcount.
Other small cleanups while we're here.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm_inline.h')
-rw-r--r-- | include/linux/mm_inline.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 49cc68a..8ac854f 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -39,24 +39,3 @@ del_page_from_lru(struct zone *zone, struct page *page) } } -/* - * Isolate one page from the LRU lists. - * - * - zone->lru_lock must be held - */ -static inline int __isolate_lru_page(struct page *page) -{ - if (unlikely(!TestClearPageLRU(page))) - return 0; - - if (get_page_testone(page)) { - /* - * It is being freed elsewhere - */ - __put_page(page); - SetPageLRU(page); - return -ENOENT; - } - - return 1; -} |