swap.c (353816f43d1fb340ff2d9a911dd5d0799c09f6a5) swap.c (1b0bd118862cd9fe9ac2872137a1b8107e83ff9d)
1/*
2 * linux/mm/swap.c
3 *
4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
5 */
6
7/*
8 * This file contains the default values for the operation of the

--- 384 unchanged lines hidden (view full) ---

393 lru_add_drain();
394 release_pages(pvec->pages, pagevec_count(pvec), pvec->cold);
395 pagevec_reinit(pvec);
396}
397
398EXPORT_SYMBOL(__pagevec_release);
399
400/*
1/*
2 * linux/mm/swap.c
3 *
4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
5 */
6
7/*
8 * This file contains the default values for the operation of the

--- 384 unchanged lines hidden (view full) ---

393 lru_add_drain();
394 release_pages(pvec->pages, pagevec_count(pvec), pvec->cold);
395 pagevec_reinit(pvec);
396}
397
398EXPORT_SYMBOL(__pagevec_release);
399
400/*
401 * pagevec_release() for pages which are known to not be on the LRU
402 *
403 * This function reinitialises the caller's pagevec.
404 */
405void __pagevec_release_nonlru(struct pagevec *pvec)
406{
407 int i;
408 struct pagevec pages_to_free;
409
410 pagevec_init(&pages_to_free, pvec->cold);
411 for (i = 0; i < pagevec_count(pvec); i++) {
412 struct page *page = pvec->pages[i];
413
414 VM_BUG_ON(PageLRU(page));
415 if (put_page_testzero(page))
416 pagevec_add(&pages_to_free, page);
417 }
418 pagevec_free(&pages_to_free);
419 pagevec_reinit(pvec);
420}
421
422/*
423 * Add the passed pages to the LRU, then drop the caller's refcount
424 * on them. Reinitialises the caller's pagevec.
425 */
426void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
427{
428 int i;
429 struct zone *zone = NULL;
430 VM_BUG_ON(is_unevictable_lru(lru));

--- 176 unchanged lines hidden ---
401 * Add the passed pages to the LRU, then drop the caller's refcount
402 * on them. Reinitialises the caller's pagevec.
403 */
404void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
405{
406 int i;
407 struct zone *zone = NULL;
408 VM_BUG_ON(is_unevictable_lru(lru));

--- 176 unchanged lines hidden ---