]> err.no Git - linux-2.6/blobdiff - mm/page_alloc.c
libata: pata_platform: make probe and remove functions device type neutral
[linux-2.6] / mm / page_alloc.c
index b5a58d476c1a66a7cc6ce94adaedfc9e2aff0a06..d73bfad1c32f2e2254aaa1f47de3bda7db0b8b88 100644 (file)
@@ -847,8 +847,19 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
                struct page *page = __rmqueue(zone, order, migratetype);
                if (unlikely(page == NULL))
                        break;
+
+               /*
+                * Split buddy pages returned by expand() are received here
+                * in physical page order. The page is added to the callers and
+                * list and the list head then moves forward. From the callers
+                * perspective, the linked list is ordered by page number in
+                * some conditions. This is useful for IO devices that can
+                * merge IO requests if the physical pages are ordered
+                * properly.
+                */
                list_add(&page->lru, list);
                set_page_private(page, migratetype);
+               list = &page->lru;
        }
        spin_unlock(&zone->lock);
        return i;