@@ -197,7 +197,7 @@ csum_failed:
/* do io completion on the original bio */
if (cb->errors) {
- bio_io_error(cb->orig_bio);
+ __bio_io_error(cb->orig_bio);
} else {
int bio_index = 0;
struct bio_vec *bvec = cb->orig_bio->bi_io_vec;
@@ -211,7 +211,7 @@ csum_failed:
bvec++;
bio_index++;
}
- bio_endio(cb->orig_bio, 0);
+ __bio_endio(cb->orig_bio, 0);
}
/* finally free the cb struct */
@@ -1490,7 +1490,7 @@ static void end_workqueue_fn(struct btrfs_work *work)
bio->bi_private = end_io_wq->private;
bio->bi_end_io = end_io_wq->end_io;
kfree(end_io_wq);
- bio_endio(bio, error);
+ __bio_endio(bio, error);
}
static int cleaner_kthread(void *arg)
@@ -5893,10 +5893,10 @@ static void btrfs_end_dio_bio(struct bio *bio, int err)
goto out;
if (dip->errors)
- bio_io_error(dip->orig_bio);
+ __bio_io_error(dip->orig_bio);
else {
set_bit(BIO_UPTODATE, &dip->orig_bio->bi_flags);
- bio_endio(dip->orig_bio, 0);
+ __bio_endio(dip->orig_bio, 0);
}
out:
bio_put(bio);
@@ -6059,7 +6059,7 @@ out_err:
*/
smp_mb__before_atomic_dec();
if (atomic_dec_and_test(&dip->pending_bios))
- bio_io_error(dip->orig_bio);
+ __bio_io_error(dip->orig_bio);
/* bio_end_io() will handle error, so we needn't return it */
return 0;
@@ -6133,7 +6133,7 @@ free_ordered:
btrfs_put_ordered_extent(ordered);
btrfs_put_ordered_extent(ordered);
}
- bio_endio(bio, ret);
+ __bio_endio(bio, ret);
}
static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *iocb,
@@ -3224,7 +3224,7 @@ static void end_bio_multi_stripe(struct bio *bio, int err)
}
kfree(multi);
- bio_endio(bio, err);
+ __bio_endio(bio, err);
} else if (!is_orig_bio) {
bio_put(bio);
}
@@ -3350,7 +3350,7 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio,
} else {
bio->bi_bdev = root->fs_info->fs_devices->latest_bdev;
bio->bi_sector = logical >> 9;
- bio_endio(bio, -EIO);
+ __bio_io_error(bio);
}
dev_nr++;
}
Use untraced __bio_endio() for nested bio handling path to suppress duplicated trace event. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/compression.c | 4 ++-- fs/btrfs/disk-io.c | 2 +- fs/btrfs/inode.c | 8 ++++---- fs/btrfs/volumes.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)