mtd/drivers/mtd/devices block2mtd.c,1.21,1.22
joern at infradead.org
joern at infradead.org
Wed Dec 22 08:17:09 EST 2004
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/home/joern/mtd/drivers/mtd/devices
Modified Files:
block2mtd.c
Log Message:
Small changes to readahead functions. I guess they can use some more,
but it was getting late and things looked too complicated.
Index: block2mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/block2mtd.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- block2mtd.c 22 Dec 2004 13:16:22 -0000 1.21
+++ block2mtd.c 22 Dec 2004 13:17:06 -0000 1.22
@@ -54,10 +54,9 @@
#define PAGE_READAHEAD 64
-
void cache_readahead(struct address_space *mapping, int index)
{
- filler_t *filler = (void*)mapping->a_ops->readpage;
+ filler_t *filler = (filler_t*)mapping->a_ops->readpage;
int i, pagei;
unsigned ret = 0;
unsigned long end_index;
@@ -95,17 +94,15 @@
ret++;
}
spin_unlock_irq(&mapping->tree_lock);
- if (ret) {
+ if (ret)
read_cache_pages(mapping, &page_pool, filler, NULL);
- //printk(KERN_INFO "Readahead [%d/%d] pages from [%d]\n",ret,PAGE_READAHEAD,index);
- }
}
static struct page* page_readahead(struct address_space *mapping, int index)
{
- filler_t *filler = (filler_t*)(mapping->a_ops->readpage);
- cache_readahead(mapping,index);
+ filler_t *filler = (filler_t*)mapping->a_ops->readpage;
+ cache_readahead(mapping, index);
return read_cache_page(mapping, index, filler, NULL);
}
More information about the linux-mtd-cvs
mailing list