diff options
Diffstat (limited to 'include/linux/pagevec.h')
-rw-r--r-- | include/linux/pagevec.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 8eb7fa76c1d0..e90a2cb02915 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -23,9 +23,9 @@ struct pagevec { | |||
23 | void __pagevec_release(struct pagevec *pvec); | 23 | void __pagevec_release(struct pagevec *pvec); |
24 | void __pagevec_release_nonlru(struct pagevec *pvec); | 24 | void __pagevec_release_nonlru(struct pagevec *pvec); |
25 | void __pagevec_free(struct pagevec *pvec); | 25 | void __pagevec_free(struct pagevec *pvec); |
26 | void __pagevec_lru_add(struct pagevec *pvec); | 26 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); |
27 | void __pagevec_lru_add_active(struct pagevec *pvec); | ||
28 | void pagevec_strip(struct pagevec *pvec); | 27 | void pagevec_strip(struct pagevec *pvec); |
28 | void pagevec_swap_free(struct pagevec *pvec); | ||
29 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, | 29 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, |
30 | pgoff_t start, unsigned nr_pages); | 30 | pgoff_t start, unsigned nr_pages); |
31 | unsigned pagevec_lookup_tag(struct pagevec *pvec, | 31 | unsigned pagevec_lookup_tag(struct pagevec *pvec, |
@@ -81,10 +81,36 @@ static inline void pagevec_free(struct pagevec *pvec) | |||
81 | __pagevec_free(pvec); | 81 | __pagevec_free(pvec); |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline void pagevec_lru_add(struct pagevec *pvec) | 84 | static inline void __pagevec_lru_add_anon(struct pagevec *pvec) |
85 | { | ||
86 | ____pagevec_lru_add(pvec, LRU_INACTIVE_ANON); | ||
87 | } | ||
88 | |||
89 | static inline void __pagevec_lru_add_active_anon(struct pagevec *pvec) | ||
90 | { | ||
91 | ____pagevec_lru_add(pvec, LRU_ACTIVE_ANON); | ||
92 | } | ||
93 | |||
94 | static inline void __pagevec_lru_add_file(struct pagevec *pvec) | ||
95 | { | ||
96 | ____pagevec_lru_add(pvec, LRU_INACTIVE_FILE); | ||
97 | } | ||
98 | |||
99 | static inline void __pagevec_lru_add_active_file(struct pagevec *pvec) | ||
100 | { | ||
101 | ____pagevec_lru_add(pvec, LRU_ACTIVE_FILE); | ||
102 | } | ||
103 | |||
104 | static inline void pagevec_lru_add_file(struct pagevec *pvec) | ||
105 | { | ||
106 | if (pagevec_count(pvec)) | ||
107 | __pagevec_lru_add_file(pvec); | ||
108 | } | ||
109 | |||
110 | static inline void pagevec_lru_add_anon(struct pagevec *pvec) | ||
85 | { | 111 | { |
86 | if (pagevec_count(pvec)) | 112 | if (pagevec_count(pvec)) |
87 | __pagevec_lru_add(pvec); | 113 | __pagevec_lru_add_anon(pvec); |
88 | } | 114 | } |
89 | 115 | ||
90 | #endif /* _LINUX_PAGEVEC_H */ | 116 | #endif /* _LINUX_PAGEVEC_H */ |