public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* PATCH: make blkmtd work
@ 2004-03-06 18:12 Matthew Reimer
  0 siblings, 0 replies; only message in thread
From: Matthew Reimer @ 2004-03-06 18:12 UTC (permalink / raw)
  To: linux-mtd

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-06 18:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-06 18:12 PATCH: make blkmtd work Matthew Reimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox