mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
btrfs: don't check for btrfs_device::bdev in btrfs_end_bio
btrfs_map_bio ensures that all submitted bios to devices have valid btrfs_device::bdev so this check can be removed from btrfs_end_bio. This check was added in june 2012 597a60fadedf ("Btrfs: don't count I/O statistic read errors for missing devices") but then in October of the same year another commit de1ee92ac3bc ("Btrfs: recheck bio against block device when we map the bio") started checking for the presence of btrfs_device::bdev before actually issuing the bio. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c31efbdf23
commit
3eee86c8fd
@ -6263,7 +6263,7 @@ static void btrfs_end_bio(struct bio *bio)
|
|||||||
bio->bi_status == BLK_STS_TARGET) {
|
bio->bi_status == BLK_STS_TARGET) {
|
||||||
struct btrfs_device *dev = btrfs_io_bio(bio)->device;
|
struct btrfs_device *dev = btrfs_io_bio(bio)->device;
|
||||||
|
|
||||||
if (dev->bdev) {
|
ASSERT(dev->bdev);
|
||||||
if (bio_op(bio) == REQ_OP_WRITE)
|
if (bio_op(bio) == REQ_OP_WRITE)
|
||||||
btrfs_dev_stat_inc_and_print(dev,
|
btrfs_dev_stat_inc_and_print(dev,
|
||||||
BTRFS_DEV_STAT_WRITE_ERRS);
|
BTRFS_DEV_STAT_WRITE_ERRS);
|
||||||
@ -6275,7 +6275,6 @@ static void btrfs_end_bio(struct bio *bio)
|
|||||||
BTRFS_DEV_STAT_FLUSH_ERRS);
|
BTRFS_DEV_STAT_FLUSH_ERRS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (bio == bbio->orig_bio)
|
if (bio == bbio->orig_bio)
|
||||||
is_orig_bio = 1;
|
is_orig_bio = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user