diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pagemap.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 8a83537d6978..862fc07dc6c0 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -84,11 +84,11 @@ static inline struct page *page_cache_alloc_cold(struct address_space *x) | |||
84 | typedef int filler_t(void *, struct page *); | 84 | typedef int filler_t(void *, struct page *); |
85 | 85 | ||
86 | extern struct page * find_get_page(struct address_space *mapping, | 86 | extern struct page * find_get_page(struct address_space *mapping, |
87 | unsigned long index); | 87 | pgoff_t index); |
88 | extern struct page * find_lock_page(struct address_space *mapping, | 88 | extern struct page * find_lock_page(struct address_space *mapping, |
89 | unsigned long index); | 89 | pgoff_t index); |
90 | extern struct page * find_or_create_page(struct address_space *mapping, | 90 | extern struct page * find_or_create_page(struct address_space *mapping, |
91 | unsigned long index, gfp_t gfp_mask); | 91 | pgoff_t index, gfp_t gfp_mask); |
92 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, | 92 | unsigned find_get_pages(struct address_space *mapping, pgoff_t start, |
93 | unsigned int nr_pages, struct page **pages); | 93 | unsigned int nr_pages, struct page **pages); |
94 | unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, | 94 | unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, |
@@ -99,41 +99,42 @@ unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | |||
99 | /* | 99 | /* |
100 | * Returns locked page at given index in given cache, creating it if needed. | 100 | * Returns locked page at given index in given cache, creating it if needed. |
101 | */ | 101 | */ |
102 | static inline struct page *grab_cache_page(struct address_space *mapping, unsigned long index) | 102 | static inline struct page *grab_cache_page(struct address_space *mapping, |
103 | pgoff_t index) | ||
103 | { | 104 | { |
104 | return find_or_create_page(mapping, index, mapping_gfp_mask(mapping)); | 105 | return find_or_create_page(mapping, index, mapping_gfp_mask(mapping)); |
105 | } | 106 | } |
106 | 107 | ||
107 | extern struct page * grab_cache_page_nowait(struct address_space *mapping, | 108 | extern struct page * grab_cache_page_nowait(struct address_space *mapping, |
108 | unsigned long index); | 109 | pgoff_t index); |
109 | extern struct page * read_cache_page_async(struct address_space *mapping, | 110 | extern struct page * read_cache_page_async(struct address_space *mapping, |
110 | unsigned long index, filler_t *filler, | 111 | pgoff_t index, filler_t *filler, |
111 | void *data); | 112 | void *data); |
112 | extern struct page * read_cache_page(struct address_space *mapping, | 113 | extern struct page * read_cache_page(struct address_space *mapping, |
113 | unsigned long index, filler_t *filler, | 114 | pgoff_t index, filler_t *filler, |
114 | void *data); | 115 | void *data); |
115 | extern int read_cache_pages(struct address_space *mapping, | 116 | extern int read_cache_pages(struct address_space *mapping, |
116 | struct list_head *pages, filler_t *filler, void *data); | 117 | struct list_head *pages, filler_t *filler, void *data); |
117 | 118 | ||
118 | static inline struct page *read_mapping_page_async( | 119 | static inline struct page *read_mapping_page_async( |
119 | struct address_space *mapping, | 120 | struct address_space *mapping, |
120 | unsigned long index, void *data) | 121 | pgoff_t index, void *data) |
121 | { | 122 | { |
122 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | 123 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; |
123 | return read_cache_page_async(mapping, index, filler, data); | 124 | return read_cache_page_async(mapping, index, filler, data); |
124 | } | 125 | } |
125 | 126 | ||
126 | static inline struct page *read_mapping_page(struct address_space *mapping, | 127 | static inline struct page *read_mapping_page(struct address_space *mapping, |
127 | unsigned long index, void *data) | 128 | pgoff_t index, void *data) |
128 | { | 129 | { |
129 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | 130 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; |
130 | return read_cache_page(mapping, index, filler, data); | 131 | return read_cache_page(mapping, index, filler, data); |
131 | } | 132 | } |
132 | 133 | ||
133 | int add_to_page_cache(struct page *page, struct address_space *mapping, | 134 | int add_to_page_cache(struct page *page, struct address_space *mapping, |
134 | unsigned long index, gfp_t gfp_mask); | 135 | pgoff_t index, gfp_t gfp_mask); |
135 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | 136 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, |
136 | unsigned long index, gfp_t gfp_mask); | 137 | pgoff_t index, gfp_t gfp_mask); |
137 | extern void remove_from_page_cache(struct page *page); | 138 | extern void remove_from_page_cache(struct page *page); |
138 | extern void __remove_from_page_cache(struct page *page); | 139 | extern void __remove_from_page_cache(struct page *page); |
139 | 140 | ||