mtd/drivers/mtd mtdblock.c,1.54,1.55
spse at infradead.org
spse at infradead.org
Tue Jul 30 11:14:00 EDT 2002
Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv16734
Modified Files:
mtdblock.c
Log Message:
Use BLK_{INC,DEC}_USE_COUNT instead of MOD_{INC,DEC}_USE_COUNT
on >= 2.4.14 this is a nop and locking is done by fs/block_dev.c
Index: mtdblock.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdblock.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- mtdblock.c 3 May 2002 16:46:24 -0000 1.54
+++ mtdblock.c 30 Jul 2002 15:13:57 -0000 1.55
@@ -280,11 +280,13 @@
if (dev >= MAX_MTD_DEVICES)
return -EINVAL;
- MOD_INC_USE_COUNT;
+ BLK_INC_USE_COUNT;
mtd = get_mtd_device(NULL, dev);
- if (!mtd)
+ if (!mtd) {
+ BLK_DEC_USE_COUNT;
return -ENODEV;
+ }
if (MTD_ABSENT == mtd->type) {
put_mtd_device(mtd);
BLK_DEC_USE_COUNT;
@@ -326,7 +328,7 @@
if (!mtdblk->cache_data) {
put_mtd_device(mtdblk->mtd);
kfree(mtdblk);
- MOD_DEC_USE_COUNT;
+ BLK_DEC_USE_COUNT;
return -ENOMEM;
}
}
More information about the linux-mtd-cvs
mailing list