aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c1b94054cbbe..b436cbb3a834 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -593,7 +593,7 @@ void fastcall __lock_page_nosync(struct page *page)
593 * Is there a pagecache struct page at the given (mapping, offset) tuple? 593 * Is there a pagecache struct page at the given (mapping, offset) tuple?
594 * If yes, increment its refcount and return it; if no, return NULL. 594 * If yes, increment its refcount and return it; if no, return NULL.
595 */ 595 */
596struct page * find_get_page(struct address_space *mapping, unsigned long offset) 596struct page * find_get_page(struct address_space *mapping, pgoff_t offset)
597{ 597{
598 struct page *page; 598 struct page *page;
599 599
@@ -617,7 +617,7 @@ EXPORT_SYMBOL(find_get_page);
617 * Returns zero if the page was not present. find_lock_page() may sleep. 617 * Returns zero if the page was not present. find_lock_page() may sleep.
618 */ 618 */
619struct page *find_lock_page(struct address_space *mapping, 619struct page *find_lock_page(struct address_space *mapping,
620 unsigned long offset) 620 pgoff_t offset)
621{ 621{
622 struct page *page; 622 struct page *page;
623 623
@@ -663,7 +663,7 @@ EXPORT_SYMBOL(find_lock_page);
663 * memory exhaustion. 663 * memory exhaustion.
664 */ 664 */
665struct page *find_or_create_page(struct address_space *mapping, 665struct page *find_or_create_page(struct address_space *mapping,
666 unsigned long index, gfp_t gfp_mask) 666 pgoff_t index, gfp_t gfp_mask)
667{ 667{
668 struct page *page, *cached_page = NULL; 668 struct page *page, *cached_page = NULL;
669 int err; 669 int err;
@@ -797,7 +797,7 @@ EXPORT_SYMBOL(find_get_pages_tag);
797 * and deadlock against the caller's locked page. 797 * and deadlock against the caller's locked page.
798 */ 798 */
799struct page * 799struct page *
800grab_cache_page_nowait(struct address_space *mapping, unsigned long index) 800grab_cache_page_nowait(struct address_space *mapping, pgoff_t index)
801{ 801{
802 struct page *page = find_get_page(mapping, index); 802 struct page *page = find_get_page(mapping, index);
803 803
@@ -866,10 +866,10 @@ void do_generic_mapping_read(struct address_space *mapping,
866 read_actor_t actor) 866 read_actor_t actor)
867{ 867{
868 struct inode *inode = mapping->host; 868 struct inode *inode = mapping->host;
869 unsigned long index; 869 pgoff_t index;
870 unsigned long offset; 870 pgoff_t last_index;
871 unsigned long last_index; 871 pgoff_t prev_index;
872 unsigned long prev_index; 872 unsigned long offset; /* offset into pagecache page */
873 unsigned int prev_offset; 873 unsigned int prev_offset;
874 struct page *cached_page; 874 struct page *cached_page;
875 int error; 875 int error;
@@ -883,7 +883,7 @@ void do_generic_mapping_read(struct address_space *mapping,
883 883
884 for (;;) { 884 for (;;) {
885 struct page *page; 885 struct page *page;
886 unsigned long end_index; 886 pgoff_t end_index;
887 loff_t isize; 887 loff_t isize;
888 unsigned long nr, ret; 888 unsigned long nr, ret;
889 889
@@ -1217,7 +1217,7 @@ EXPORT_SYMBOL(generic_file_aio_read);
1217 1217
1218static ssize_t 1218static ssize_t
1219do_readahead(struct address_space *mapping, struct file *filp, 1219do_readahead(struct address_space *mapping, struct file *filp,
1220 unsigned long index, unsigned long nr) 1220 pgoff_t index, unsigned long nr)
1221{ 1221{
1222 if (!mapping || !mapping->a_ops || !mapping->a_ops->readpage) 1222 if (!mapping || !mapping->a_ops || !mapping->a_ops->readpage)
1223 return -EINVAL; 1223 return -EINVAL;
@@ -1237,8 +1237,8 @@ asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count)
1237 if (file) { 1237 if (file) {
1238 if (file->f_mode & FMODE_READ) { 1238 if (file->f_mode & FMODE_READ) {
1239 struct address_space *mapping = file->f_mapping; 1239 struct address_space *mapping = file->f_mapping;
1240 unsigned long start = offset >> PAGE_CACHE_SHIFT; 1240 pgoff_t start = offset >> PAGE_CACHE_SHIFT;
1241 unsigned long end = (offset + count - 1) >> PAGE_CACHE_SHIFT; 1241 pgoff_t end = (offset + count - 1) >> PAGE_CACHE_SHIFT;
1242 unsigned long len = end - start + 1; 1242 unsigned long len = end - start + 1;
1243 ret = do_readahead(mapping, file, start, len); 1243 ret = do_readahead(mapping, file, start, len);
1244 } 1244 }
@@ -1256,7 +1256,7 @@ asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count)
1256 * This adds the requested page to the page cache if it isn't already there, 1256 * This adds the requested page to the page cache if it isn't already there,
1257 * and schedules an I/O to read in its contents from disk. 1257 * and schedules an I/O to read in its contents from disk.
1258 */ 1258 */
1259static int fastcall page_cache_read(struct file * file, unsigned long offset) 1259static int fastcall page_cache_read(struct file * file, pgoff_t offset)
1260{ 1260{
1261 struct address_space *mapping = file->f_mapping; 1261 struct address_space *mapping = file->f_mapping;
1262 struct page *page; 1262 struct page *page;
@@ -1497,7 +1497,7 @@ EXPORT_SYMBOL(generic_file_mmap);
1497EXPORT_SYMBOL(generic_file_readonly_mmap); 1497EXPORT_SYMBOL(generic_file_readonly_mmap);
1498 1498
1499static struct page *__read_cache_page(struct address_space *mapping, 1499static struct page *__read_cache_page(struct address_space *mapping,
1500 unsigned long index, 1500 pgoff_t index,
1501 int (*filler)(void *,struct page*), 1501 int (*filler)(void *,struct page*),
1502 void *data) 1502 void *data)
1503{ 1503{
@@ -1538,7 +1538,7 @@ repeat:
1538 * after submitting it to the filler. 1538 * after submitting it to the filler.
1539 */ 1539 */
1540struct page *read_cache_page_async(struct address_space *mapping, 1540struct page *read_cache_page_async(struct address_space *mapping,
1541 unsigned long index, 1541 pgoff_t index,
1542 int (*filler)(void *,struct page*), 1542 int (*filler)(void *,struct page*),
1543 void *data) 1543 void *data)
1544{ 1544{
@@ -1586,7 +1586,7 @@ EXPORT_SYMBOL(read_cache_page_async);
1586 * If the page does not get brought uptodate, return -EIO. 1586 * If the page does not get brought uptodate, return -EIO.
1587 */ 1587 */
1588struct page *read_cache_page(struct address_space *mapping, 1588struct page *read_cache_page(struct address_space *mapping,
1589 unsigned long index, 1589 pgoff_t index,
1590 int (*filler)(void *,struct page*), 1590 int (*filler)(void *,struct page*),
1591 void *data) 1591 void *data)
1592{ 1592{