summaryrefslogtreecommitdiffstats
path: root/block
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 /block
parent4c46501d1659475dc6c89554af6ce7fe6ecf615c (diff)
downloadop-kernel-dev-0762b8bde9729f10f8e6249809660ff2ec3ad735.zip
op-kernel-dev-0762b8bde9729f10f8e6249809660ff2ec3ad735.tar.gz
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 'block')
-rw-r--r--block/blk-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index e0a5ee3..a4a7c08d 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1274,7 +1274,7 @@ __setup("fail_make_request=", setup_fail_make_request);
static int should_fail_request(struct bio *bio)
{
if ((bio->bi_bdev->bd_disk->flags & GENHD_FL_FAIL) ||
- (bio->bi_bdev->bd_part && bio->bi_bdev->bd_part->make_it_fail))
+ bio->bi_bdev->bd_part->make_it_fail)
return should_fail(&fail_make_request, bio->bi_size);
return 0;
OpenPOWER on IntegriCloud