PATCH: make blkmtd work
Matthew Reimer
mreimer at vpop.net
Sat Mar 6 13:12:44 EST 2004
blkmtd wasn't working for me at all, oopsing because it tried to
dereference a NULL pointer. This patch fixes it:
--- blkmtd.c.orig 2004-03-06 11:58:30.000000000 -0600
+++ blkmtd.c 2004-03-06 11:58:45.000000000 -0600
@@ -664,12 +664,12 @@ static struct blkmtd_dev *add_device(cha
}
memset(dev, 0, sizeof(struct blkmtd_dev));
- atomic_set(&(dev->blkdev->bd_inode->i_mapping->truncate_count), 0);
if(!readonly) {
init_MUTEX(&dev->wrbuf_mutex);
}
dev->blkdev = bdev;
+ atomic_set(&(dev->blkdev->bd_inode->i_mapping->truncate_count), 0);
dev->mtd_info.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
/* Setup the MTD structure */
This patch makes it work for me. Does this look right? If so, how do I
go about getting it committed?
Matt
More information about the linux-mtd
mailing list