Re: 2.5.20: smbfs oops in smb_readpage

Andrew Morton (akpm@zip.com.au)
Wed, 05 Jun 2002 19:03:18 -0700


glynis@butterfly.hjsoft.com wrote:
>
> reading a file from an smbfs causes this oops, then the smbfs won't
> unmount.
> ...
> >>EIP; ccae8013 <[smbfs]smb_readpage+13/40> <=====
>
> >>ebx; c11a2850 <_end+ea2c6c/c5e241c>
> >>ecx; c11a2850 <_end+ea2c6c/c5e241c>
> >>edx; c1049b8c <_end+d49fa8/c5e241c>
> >>edi; c66f3138 <_end+63f3554/c5e241c>
> >>esp; c78a5e44 <_end+75a6260/c5e241c>
>
> Trace; c013bed4 <read_pages+84/a0>
> Trace; c013bfb0 <do_page_cache_readahead+c0/140>

You can blame me for that.

Does this work OK?

--- 2.5.20/mm/readahead.c~readpages Wed Jun 5 18:59:49 2002
+++ 2.5.20-akpm/mm/readahead.c Wed Jun 5 19:00:14 2002
@@ -32,7 +32,7 @@ static inline unsigned long get_min_read
}

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
* 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;

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/