diff options
author | Martin Brandenburg <martin@omnibond.com> | 2018-02-15 18:02:43 +0000 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2019-05-03 14:32:38 -0400 |
commit | a68d9c606a67952fe547399bc45eebc8d83078bd (patch) | |
tree | 7d6626580be796da449fb5790128e2cd0952dbb8 /fs/orangefs | |
parent | afd9fb2a31797b4c787034294a4062df0c19c37e (diff) |
orangefs: remove orangefs_readpages
It's a copy of the loop which would run in read_pages from
mm/readahead.c.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/inode.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 2708bf8af9cf..fd23a8ca641c 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -15,7 +15,7 @@ #include "orangefs-kernel.h" #include "orangefs-bufmap.h" -static int read_one_page(struct page *page) +static int orangefs_readpage(struct file *file, struct page *page) { int ret; int max_block; @@ -60,42 +60,6 @@ static int read_one_page(struct page *page) return ret; } -static int orangefs_readpage(struct file *file, struct page *page) -{ - return read_one_page(page); -} - -static int orangefs_readpages(struct file *file, - struct address_space *mapping, - struct list_head *pages, - unsigned nr_pages) -{ - int page_idx; - int ret; - - gossip_debug(GOSSIP_INODE_DEBUG, "orangefs_readpages called\n"); - - for (page_idx = 0; page_idx < nr_pages; page_idx++) { - struct page *page; - - page = lru_to_page(pages); - list_del(&page->lru); - if (!add_to_page_cache(page, - mapping, - page->index, - readahead_gfp_mask(mapping))) { - ret = read_one_page(page); - gossip_debug(GOSSIP_INODE_DEBUG, - "failure adding page to cache, read_one_page returned: %d\n", - ret); - } else { - put_page(page); - } - } - BUG_ON(!list_empty(pages)); - return 0; -} - static void orangefs_invalidatepage(struct page *page, unsigned int offset, unsigned int length) @@ -141,7 +105,6 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb, /** ORANGEFS2 implementation of address space operations */ static const struct address_space_operations orangefs_address_operations = { .readpage = orangefs_readpage, - .readpages = orangefs_readpages, .invalidatepage = orangefs_invalidatepage, .releasepage = orangefs_releasepage, .direct_IO = orangefs_direct_IO, |