Otherwise the bio will be empty, and blk_partition_remap() won't
do anything. Oops, caused corruption.
Signed-off-by: Jens Axboe <axboe@fb.com>
bio = bio_alloc(GFP_KERNEL, (ret + pgoff + PAGE_SIZE - 1) >> PAGE_SHIFT);
bio->bi_bdev = bdev;
bio->bi_iter.bi_sector = offset >> blkbits;
- blk_partition_remap(bio);
total_len = ret;
i = ret = 0;
i++;
}
+ blk_partition_remap(bio);
+
if (iov_iter_rw(iter) == WRITE) {
op = REQ_OP_WRITE;
op_flags = WRITE_ODIRECT;