block: move __dev from disk to part0
authorTejun Heo <tj@kernel.org>
Fri, 29 Aug 2008 07:01:47 +0000 (09:01 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:07 +0000 (08:56 +0200)
commit548b10eb2959c96cef6fc29fc96e0931eeb53bc5
tree7166bc04336b80a69f87a9add097919b418f4f43
parent80795aefb76d10c5d698e60c7e7750b5330787da
block: move __dev from disk to part0

Move disk->__dev to part0->__dev.  This simplifies bdget_disk() and
lookup_devt() and allows common sysfs attributes to be unified.
part_to_disk() is updated to handle part0 -> disk.

Updated to include a fix from Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
he writes:

"part0 is a "special" partition and doesn't need to have capacity set - this
fixes regression caused by "block: move __dev from disk to part0" commit."

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/genhd.c
include/linux/genhd.h