]> git.baikalelectronics.ru Git - kernel.git/commit
block: don't test for partition size in bdget_disk() and blk_lookup_devt()
authorTejun Heo <tj@kernel.org>
Fri, 29 Aug 2008 09:41:51 +0000 (11:41 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:11 +0000 (08:56 +0200)
commit5aa28cd7a35868db26b30f77a435e7febc3567f4
tree2609360651b9a0d137c5c564a971152c90d52001
parent53b7b86b167ee7fb95351137118841ea63818e05
block: don't test for partition size in bdget_disk() and blk_lookup_devt()

bdget_disk() and blk_lookup_devt() never cared whether the specified
partition (or disk) is zero sized or not.  I got confused while
converting those not to depend on consecutive minor numbers in commit
5a6411b1178baf534aa9138052864dfa89d3eada and later when dev0 was added
it broke callers which expected to get valid return for zero sized
disk devices.

So, they never needed nr_sects checks in the first place.  Kill them.

This problem was spotted and debugged by Bartlmoiej Zolnierkiewicz.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/genhd.c