Commit b2c3843b authored by Fengguang Wu's avatar Fengguang Wu Committed by Linus Torvalds

filemap: trivial code cleanups

- remove unused local next_index in do_generic_mapping_read()
- remove a redudant page_cache_read() declaration
Signed-off-by: default avatarFengguang Wu <wfg@mail.ustc.edu.cn>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f2e18982
...@@ -869,7 +869,6 @@ void do_generic_mapping_read(struct address_space *mapping, ...@@ -869,7 +869,6 @@ void do_generic_mapping_read(struct address_space *mapping,
unsigned long index; unsigned long index;
unsigned long offset; unsigned long offset;
unsigned long last_index; unsigned long last_index;
unsigned long next_index;
unsigned long prev_index; unsigned long prev_index;
unsigned int prev_offset; unsigned int prev_offset;
struct page *cached_page; struct page *cached_page;
...@@ -877,7 +876,6 @@ void do_generic_mapping_read(struct address_space *mapping, ...@@ -877,7 +876,6 @@ void do_generic_mapping_read(struct address_space *mapping,
cached_page = NULL; cached_page = NULL;
index = *ppos >> PAGE_CACHE_SHIFT; index = *ppos >> PAGE_CACHE_SHIFT;
next_index = index;
prev_index = ra->prev_pos >> PAGE_CACHE_SHIFT; prev_index = ra->prev_pos >> PAGE_CACHE_SHIFT;
prev_offset = ra->prev_pos & (PAGE_CACHE_SIZE-1); prev_offset = ra->prev_pos & (PAGE_CACHE_SIZE-1);
last_index = (*ppos + desc->count + PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT; last_index = (*ppos + desc->count + PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT;
...@@ -1250,7 +1248,6 @@ asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count) ...@@ -1250,7 +1248,6 @@ asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count)
} }
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
static int FASTCALL(page_cache_read(struct file * file, unsigned long offset));
/** /**
* page_cache_read - adds requested page to the page cache if not already there * page_cache_read - adds requested page to the page cache if not already there
* @file: file to read * @file: file to read
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment