Commit 3b9d35d7 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Jens Axboe

drbd: merge_bvec_fn: properly remap bvm->bi_bdev

This was not noticed for many years. Affects operation if
md raid is used a backing device for DRBD.

CC: stable@kernel.org # v3.2+
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent ff8bd88b
...@@ -1545,6 +1545,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct ...@@ -1545,6 +1545,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct
struct request_queue * const b = struct request_queue * const b =
device->ldev->backing_bdev->bd_disk->queue; device->ldev->backing_bdev->bd_disk->queue;
if (b->merge_bvec_fn) { if (b->merge_bvec_fn) {
bvm->bi_bdev = device->ldev->backing_bdev;
backing_limit = b->merge_bvec_fn(b, bvm, bvec); backing_limit = b->merge_bvec_fn(b, bvm, bvec);
limit = min(limit, backing_limit); limit = min(limit, backing_limit);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment