]> git.neil.brown.name Git - history.git/commitdiff
Use the correct inode for read-ahead trashing/
authorLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 26 Apr 2002 05:35:46 +0000 (22:35 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Fri, 26 Apr 2002 05:35:46 +0000 (22:35 -0700)
mm/readahead.c

index 3643d3ecb08f7efdbf08ce5e8e214904769e9fc6..cf7efc8d5ed5d3e6bd0673944e8745d4ea59b49a 100644 (file)
@@ -338,8 +338,8 @@ void page_cache_readaround(struct file *file, unsigned long offset)
  */
 void handle_ra_thrashing(struct file *file)
 {
-       struct inode *inode = file->f_dentry->d_inode;
-       const unsigned long min = get_min_readahead(inode);
+       struct address_space * mapping = file->f_dentry->d_inode->i_mapping;
+       const unsigned long min = get_min_readahead(mapping->host);
 
        file->f_ra.next_size -= 3;
        if (file->f_ra.next_size < min)