diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-08-31 04:33:12 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-08-31 04:33:12 -0700 |
| commit | 2181ea2edc3154945a484fe3dca47fa00f0f4753 (patch) | |
| tree | 0bfabecdd0bda960a7d0162f5893415b6ee21a89 /include/linux/genhd.h | |
| parent | 605102e5016504d460c17eca4441ec795d73687a (diff) | |
[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:
Diffstat (limited to 'include/linux/genhd.h')
| -rw-r--r-- | include/linux/genhd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 623baf2fd239..460ef0362ab5 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -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) { |
