diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:27:27 -0400 | 
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:27:27 -0400 | 
| commit | 499792ec6dc737467e5486527cef95ed7d74fba9 (patch) | |
| tree | b88c4ef9d4491c17f71d26d33e73f05f7c7ea6a0 /mm/swap.c | |
| parent | 421b20b9c44b3fcdc07d6af875dad5ae86fad014 (diff) | |
| parent | d14b50cc60ca465290fcdb3b88e7d5fb684361ed (diff) | |
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'mm/swap.c')
| -rw-r--r-- | mm/swap.c | 20 | 
1 files changed, 20 insertions, 0 deletions
| @@ -54,6 +54,26 @@ void put_page(struct page *page) | |||
| 54 | } | 54 | } | 
| 55 | EXPORT_SYMBOL(put_page); | 55 | EXPORT_SYMBOL(put_page); | 
| 56 | 56 | ||
| 57 | /** | ||
| 58 | * put_pages_list(): release a list of pages | ||
| 59 | * | ||
| 60 | * Release a list of pages which are strung together on page.lru. Currently | ||
| 61 | * used by read_cache_pages() and related error recovery code. | ||
| 62 | * | ||
| 63 | * @pages: list of pages threaded on page->lru | ||
| 64 | */ | ||
| 65 | void put_pages_list(struct list_head *pages) | ||
| 66 | { | ||
| 67 | while (!list_empty(pages)) { | ||
| 68 | struct page *victim; | ||
| 69 | |||
| 70 | victim = list_entry(pages->prev, struct page, lru); | ||
| 71 | list_del(&victim->lru); | ||
| 72 | page_cache_release(victim); | ||
| 73 | } | ||
| 74 | } | ||
| 75 | EXPORT_SYMBOL(put_pages_list); | ||
| 76 | |||
| 57 | /* | 77 | /* | 
| 58 | * Writeback is about to end against a page which has been marked for immediate | 78 | * Writeback is about to end against a page which has been marked for immediate | 
| 59 | * reclaim. If it still appears to be reclaimable, move it to the tail of the | 79 | * reclaim. If it still appears to be reclaimable, move it to the tail of the | 
