mtd/drivers/mtd/devices block2mtd.c,1.25,1.26
gleixner at infradead.org
gleixner at infradead.org
Thu Mar 17 14:48:22 EST 2005
- Previous message: mtd/drivers/mtd/devices slram.c, 1.34, 1.35 blkmtd.c, 1.24,
1.25 docprobe.c, 1.44, 1.45 mtdram.c, 1.35, 1.36 pmc551.c,
1.30, 1.31
- Next message: mtd/drivers/mtd Kconfig,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/tmp/cvs-serv26157
Modified Files:
block2mtd.c
Log Message:
Merge from mainstream.
[PATCH] make mapping->tree_lock an rwlock
Convert mapping->tree_lock to an rwlock.
Replaced some printk() by INFO().
Index: block2mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/block2mtd.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- block2mtd.c 7 Mar 2005 20:29:05 -0000 1.25
+++ block2mtd.c 17 Mar 2005 19:48:19 -0000 1.26
@@ -52,17 +52,17 @@
loff_t isize = i_size_read(inode);
if (!isize) {
- printk(KERN_INFO "iSize=0 in cache_readahead\n");
+ INFO("iSize=0 in cache_readahead\n");
return;
}
end_index = ((isize - 1) >> PAGE_CACHE_SHIFT);
- spin_lock_irq(&mapping->tree_lock);
+ read_lock_irq(&mapping->tree_lock);
for (i = 0; i < PAGE_READAHEAD; i++) {
pagei = index + i;
if (pagei > end_index) {
- printk(KERN_INFO "Overrun end of disk in cache readahead\n");
+ INFO("Overrun end of disk in cache readahead\n");
break;
}
page = radix_tree_lookup(&mapping->page_tree, pagei);
@@ -70,16 +70,16 @@
break;
if (page)
continue;
- spin_unlock_irq(&mapping->tree_lock);
+ read_unlock_irq(&mapping->tree_lock);
page = page_cache_alloc_cold(mapping);
- spin_lock_irq(&mapping->tree_lock);
+ read_lock_irq(&mapping->tree_lock);
if (!page)
break;
page->index = pagei;
list_add(&page->lru, &page_pool);
ret++;
}
- spin_unlock_irq(&mapping->tree_lock);
+ read_unlock_irq(&mapping->tree_lock);
if (ret)
read_cache_pages(mapping, &page_pool, filler, NULL);
}
- Previous message: mtd/drivers/mtd/devices slram.c, 1.34, 1.35 blkmtd.c, 1.24,
1.25 docprobe.c, 1.44, 1.45 mtdram.c, 1.35, 1.36 pmc551.c,
1.30, 1.31
- Next message: mtd/drivers/mtd Kconfig,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the linux-mtd-cvs
mailing list