diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 8affc88b0e0a4b68ed61e08fd1552331fd9c8517..e775d68834ea312d43a50d8da86b8d4bdc2749c2 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -72,7 +72,7 @@ static void btrfs_log_dev_io_error(struct bio *bio, struct btrfs_device *dev) if (btrfs_op(bio) == BTRFS_MAP_WRITE) btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_WRITE_ERRS); - if (!(bio->bi_opf & REQ_RAHEAD)) + else if (!(bio->bi_opf & REQ_RAHEAD)) btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_READ_ERRS); if (bio->bi_opf & REQ_PREFLUSH) btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_FLUSH_ERRS);