summaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 19:56:12 +0900
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:08 +0200
commit0762b8bde9729f10f8e6249809660ff2ec3ad735 (patch)
tree12aa94ef16b840f713f833c712d335646c816dc1 /include/linux/genhd.h
parent4c46501d1659475dc6c89554af6ce7fe6ecf615c (diff)
downloadlinux-0762b8bde9729f10f8e6249809660ff2ec3ad735.tar.gz
linux-0762b8bde9729f10f8e6249809660ff2ec3ad735.tar.bz2
linux-0762b8bde9729f10f8e6249809660ff2ec3ad735.zip
block: always set bdev->bd_part
Till now, bdev->bd_part is set only if the bdev was for parts other than part0. This patch makes bdev->bd_part always set so that code paths don't have to differenciate common handling. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 2c0e1b597ab4..45a3682b5d87 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -412,7 +412,7 @@ extern void rand_initialize_disk(struct gendisk *disk);
static inline sector_t get_start_sect(struct block_device *bdev)
{
- return bdev->bd_contains == bdev ? 0 : bdev->bd_part->start_sect;
+ return bdev->bd_part->start_sect;
}
static inline sector_t get_capacity(struct gendisk *disk)
{