My mtdblock problems are probably related to this, so I'll followup here.
mtdblock registers its gendisk structure in its open() method.
Unfortunately, do_open wants to obtain this structure before
the open() method (but doesn't use it.)
This patch trivially re-orders stuff to work, and works for me
(with mtdblock.)
--- orig/fs/block_dev.c Thu Oct 3 12:46:08 2002
+++ linux/fs/block_dev.c Thu Oct 3 13:08:10 2002
@@ -631,7 +631,7 @@
}
if (bdev->bd_contains == bdev) {
int part;
- struct gendisk *g = get_gendisk(bdev->bd_dev, &part);
+ struct gendisk *g;
if (!bdev->bd_queue) {
struct blk_dev_struct *p = blk_dev + major(dev);
@@ -645,6 +645,7 @@
if (ret)
goto out2;
}
+ g = get_gendisk(bdev->bd_dev, &part);
if (!bdev->bd_openers) {
struct backing_dev_info *bdi;
sector_t sect = 0;
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/