aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFengguang Wu <wfg@mail.ustc.edu.cn>2007-10-16 04:24:37 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:53 -0400
commit57f6b96c09c30e444e0d3fc3080feba037657a7b (patch)
tree4b62e2f63352b74d6c9dd1ed1142b971dcd207e3 /include
parentb2c3843b1e25e2c67347c4671f33fbe6f5067e6b (diff)
filemap: convert some unsigned long to pgoff_t
Convert some 'unsigned long' to pgoff_t. Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pagemap.h23
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)
84typedef int filler_t(void *, struct page *); 84typedef int filler_t(void *, struct page *);
85 85
86extern struct page * find_get_page(struct address_space *mapping, 86extern struct page * find_get_page(struct address_space *mapping,
87 unsigned long index); 87 pgoff_t index);
88extern struct page * find_lock_page(struct address_space *mapping, 88extern struct page * find_lock_page(struct address_space *mapping,
89 unsigned long index); 89 pgoff_t index);
90extern struct page * find_or_create_page(struct address_space *mapping, 90extern 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);
92unsigned find_get_pages(struct address_space *mapping, pgoff_t start, 92unsigned 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);
94unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start, 94unsigned 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 */
102static inline struct page *grab_cache_page(struct address_space *mapping, unsigned long index) 102static 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
107extern struct page * grab_cache_page_nowait(struct address_space *mapping, 108extern struct page * grab_cache_page_nowait(struct address_space *mapping,
108 unsigned long index); 109 pgoff_t index);
109extern struct page * read_cache_page_async(struct address_space *mapping, 110extern 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);
112extern struct page * read_cache_page(struct address_space *mapping, 113extern 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);
115extern int read_cache_pages(struct address_space *mapping, 116extern 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
118static inline struct page *read_mapping_page_async( 119static 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
126static inline struct page *read_mapping_page(struct address_space *mapping, 127static 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
133int add_to_page_cache(struct page *page, struct address_space *mapping, 134int 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);
135int add_to_page_cache_lru(struct page *page, struct address_space *mapping, 136int 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);
137extern void remove_from_page_cache(struct page *page); 138extern void remove_from_page_cache(struct page *page);
138extern void __remove_from_page_cache(struct page *page); 139extern void __remove_from_page_cache(struct page *page);
139 140