Commit af86a8a7 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Greg Kroah-Hartman

drbd: merge_bvec_fn: properly remap bvm->bi_bdev

commit 3b9d35d7 upstream.

This was not noticed for many years. Affects operation if
md raid is used a backing device for DRBD.
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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f1a65401
...@@ -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