diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-01-12 17:47:08 -0500 |
| commit | 94bc2be31a01a3055ec94176e595dfe208e92d3b (patch) | |
| tree | ebfbe81c6718a6390bfa1b99c6d228237d818576 /include/linux/mm_inline.h | |
| parent | c32a0b689cb9cc160cfcd19735bbf50bb70c6ef4 (diff) | |
| parent | 58cba4650a7a414eabd2b40cc9d8e45fcdf192d9 (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'include/linux/mm_inline.h')
| -rw-r--r-- | include/linux/mm_inline.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 47762ca695a5..49cc68af01f8 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
| @@ -38,3 +38,25 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
| 38 | zone->nr_inactive--; | 38 | zone->nr_inactive--; |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | |||
| 42 | /* | ||
| 43 | * Isolate one page from the LRU lists. | ||
| 44 | * | ||
| 45 | * - zone->lru_lock must be held | ||
| 46 | */ | ||
| 47 | static inline int __isolate_lru_page(struct page *page) | ||
| 48 | { | ||
| 49 | if (unlikely(!TestClearPageLRU(page))) | ||
| 50 | return 0; | ||
| 51 | |||
| 52 | if (get_page_testone(page)) { | ||
| 53 | /* | ||
| 54 | * It is being freed elsewhere | ||
| 55 | */ | ||
| 56 | __put_page(page); | ||
| 57 | SetPageLRU(page); | ||
| 58 | return -ENOENT; | ||
| 59 | } | ||
| 60 | |||
| 61 | return 1; | ||
| 62 | } | ||
