Commit f62e2b90 authored by Linus Torvalds's avatar Linus Torvalds

Use the correct inode for read-ahead trashing/

parent 92216226
...@@ -338,8 +338,8 @@ void page_cache_readaround(struct file *file, unsigned long offset) ...@@ -338,8 +338,8 @@ void page_cache_readaround(struct file *file, unsigned long offset)
*/ */
void handle_ra_thrashing(struct file *file) void handle_ra_thrashing(struct file *file)
{ {
struct inode *inode = file->f_dentry->d_inode; struct address_space * mapping = file->f_dentry->d_inode->i_mapping;
const unsigned long min = get_min_readahead(inode); const unsigned long min = get_min_readahead(mapping->host);
file->f_ra.next_size -= 3; file->f_ra.next_size -= 3;
if (file->f_ra.next_size < min) if (file->f_ra.next_size < min)
......
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