]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix smbfs oops
authorAndrew Morton <akpm@zip.com.au>
Wed, 12 Jun 2002 05:57:32 +0000 (22:57 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Wed, 12 Jun 2002 05:57:32 +0000 (22:57 -0700)
Silly oversight - read_pages needs to pass the file *
down to ->readpage().

mm/readahead.c

index 2d4e4af9a23884cd4ff2388b8c4bb2404a13b304..f501dac129909be82753e9282a11f0e970c54d3f 100644 (file)
@@ -32,7 +32,7 @@ static inline unsigned long get_min_readahead(struct file *file)
 }
 
 static int
-read_pages(struct address_space *mapping,
+read_pages(struct file *file, struct address_space *mapping,
                struct list_head *pages, unsigned nr_pages)
 {
        unsigned page_idx;
@@ -44,7 +44,7 @@ read_pages(struct address_space *mapping,
                struct page *page = list_entry(pages->prev, struct page, list);
                list_del(&page->list);
                if (!add_to_page_cache_unique(page, mapping, page->index))
-                       mapping->a_ops->readpage(NULL, page);
+                       mapping->a_ops->readpage(file, page);
                page_cache_release(page);
        }
        return 0;
@@ -167,7 +167,7 @@ void do_page_cache_readahead(struct file *file,
         * uptodate then the caller will launch readpage again, and
         * will then handle the error.
         */
-       read_pages(mapping, &page_pool, nr_to_really_read);
+       read_pages(file, mapping, &page_pool, nr_to_really_read);
        blk_run_queues();
        BUG_ON(!list_empty(&page_pool));
        return;