diff options
Diffstat (limited to 'fs/btrfs/bio.c')
-rw-r--r-- | fs/btrfs/bio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 088817618f57..8285aa49586a 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -63,7 +63,6 @@ struct bio *btrfs_bio_clone_partial(struct bio *orig, u64 offset, u64 size, btrfs_bio_init(bbio, inode, end_io, private); bio_trim(bio, offset >> 9, size >> 9); - bbio->iter = bio->bi_iter; return bio; } @@ -254,6 +253,10 @@ void btrfs_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio, int mirror BUG(); } + /* Save the iter for the end_io handler for data reads. */ + if (bio_op(bio) == REQ_OP_READ && !(bio->bi_opf & REQ_META)) + bbio->iter = bio->bi_iter; + if (!bioc) { /* Single mirror read/write fast path */ bbio->mirror_num = mirror_num; |