- sync fedora branch
authorMark Huang <mlhuang@cs.princeton.edu>
Sun, 21 Aug 2005 00:21:46 +0000 (00:21 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Sun, 21 Aug 2005 00:21:46 +0000 (00:21 +0000)
mm/swap.c

index ff0c7e6..7771d28 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(put_page);
  */
 int rotate_reclaimable_page(struct page *page)
 {
-       struct zone *zone = page_zone(page);
+       struct zone *zone;
        unsigned long flags;
 
        if (PageLocked(page))
@@ -83,6 +83,7 @@ int rotate_reclaimable_page(struct page *page)
        if (!PageLRU(page))
                return 1;
 
+       zone = page_zone(page);
        spin_lock_irqsave(&zone->lru_lock, flags);
        if (PageLRU(page) && !PageActive(page)) {
                list_del(&page->lru);