Skip to content

Commit

Permalink
[PATCH] tidy "md: check bio address after mapping through partitions"
Browse files Browse the repository at this point in the history
Neil's xterms are too wide.

Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Nov 3, 2006
1 parent 7bd473f commit df66b85
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3075,11 +3075,12 @@ void generic_make_request(struct bio *bio)
if (maxsector) {
sector_t sector = bio->bi_sector;

if (maxsector < nr_sectors || maxsector - nr_sectors < sector) {
if (maxsector < nr_sectors ||
maxsector - nr_sectors < sector) {
/*
* This may well happen - partitions are not checked
* to make sure they are within the size of the
* whole device.
* This may well happen - partitions are not
* checked to make sure they are within the size
* of the whole device.
*/
handle_bad_sector(bio);
goto end_io;
Expand Down

0 comments on commit df66b85

Please sign in to comment.