diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:12 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:08 -0400 |
commit | 0762b8bde9729f10f8e6249809660ff2ec3ad735 (patch) | |
tree | 12aa94ef16b840f713f833c712d335646c816dc1 /fs/partitions/check.c | |
parent | 4c46501d1659475dc6c89554af6ce7fe6ecf615c (diff) |
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 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index f0f604950ff4..87298c0fc8ce 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -134,12 +134,7 @@ char *disk_name(struct gendisk *hd, int partno, char *buf) | |||
134 | 134 | ||
135 | const char *bdevname(struct block_device *bdev, char *buf) | 135 | const char *bdevname(struct block_device *bdev, char *buf) |
136 | { | 136 | { |
137 | int partno = 0; | 137 | return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf); |
138 | |||
139 | if (bdev->bd_part) | ||
140 | partno = bdev->bd_part->partno; | ||
141 | |||
142 | return disk_name(bdev->bd_disk, partno, buf); | ||
143 | } | 138 | } |
144 | 139 | ||
145 | EXPORT_SYMBOL(bdevname); | 140 | EXPORT_SYMBOL(bdevname); |