lkml.org 
[lkml]   [2002]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: initrd breakage in 2.5.38-2.5.40
On Thu, Oct 03, 2002 at 07:07:21AM -0400, Alexander Viro wrote:
> On Thu, 3 Oct 2002, Mikael Pettersson wrote:
>
> > First I thought the problem was caused by a apparently missing
> > set_capacity() call in 2.5.38's drivers/block/rd.c:
>
> I _really_ doubt it - check the loop just above the add_disk() one.
> set_capacity() call is done there, repeating it won't change anything.

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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.360 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site