Skip to content

Commit

Permalink
Btrfs: Remove bogus max_sector warnings from the extent_io code
Browse files Browse the repository at this point in the history
It was testing the bio before doing logical->physical mapping, so the
test was always wrong.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 7bf3b49 commit 41471e8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,6 @@ extent_bio_alloc(struct block_device *bdev, u64 first_sector, int nr_vecs,

static int submit_one_bio(int rw, struct bio *bio, int mirror_num)
{
u64 maxsector;
int ret = 0;
struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
struct page *page = bvec->bv_page;
Expand Down Expand Up @@ -1730,12 +1729,6 @@ static int submit_one_bio(int rw, struct bio *bio, int mirror_num)

bio_get(bio);

maxsector = bio->bi_bdev->bd_inode->i_size >> 9;
if (maxsector < bio->bi_sector) {
printk("sector too large max %Lu got %llu\n", maxsector,
(unsigned long long)bio->bi_sector);
WARN_ON(1);
}
if (tree->ops && tree->ops->submit_bio_hook)
tree->ops->submit_bio_hook(page->mapping->host, rw, bio,
mirror_num);
Expand Down

0 comments on commit 41471e8

Please sign in to comment.