Commit 2181ea2e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] large dev_t 12/12 oops fix

From: viro@parcelfarce.linux.theplanet.co.uk

On Wed, Aug 27, 2003 at 01:46:37AM -0700, Andrew Morton wrote:
>
> LILO seems to be oopsing in HDIO_GETGEO ioctl for some reason, in
> generic_ide_ioctl().
>
> I'm not sure quite why though.  Could one of your patches affected this
> area?

The last one (fix for hd_struct handling).  The fix follows:
parent 605102e5
......@@ -197,7 +197,7 @@ extern void rand_initialize_disk(struct gendisk *disk);
static inline sector_t get_start_sect(struct block_device *bdev)
{
return bdev->bd_part->start_sect;
return bdev->bd_contains == bdev ? 0 : bdev->bd_part->start_sect;
}
static inline sector_t get_capacity(struct gendisk *disk)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment