diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2014-11-10 17:21:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-29 17:40:57 -0800 |
commit | df84281d1eead0f3e83f4c382c75bc67c180cd3d (patch) | |
tree | 1a8e02556359e8116efd872fbc34d1d439624404 /drivers/block | |
parent | 34dcc70b3eaf4e560b37001a56c3b4e36a014d54 (diff) | |
download | lwn-df84281d1eead0f3e83f4c382c75bc67c180cd3d.tar.gz lwn-df84281d1eead0f3e83f4c382c75bc67c180cd3d.zip |
drbd: merge_bvec_fn: properly remap bvm->bi_bdev
commit 3b9d35d744bb5139f9fed57f38c019bb8c7d351c upstream.
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: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index c24379ffd4e3..b2ae184a637c 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -1309,6 +1309,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct struct request_queue * const b = mdev->ldev->backing_bdev->bd_disk->queue; if (b->merge_bvec_fn) { + bvm->bi_bdev = mdev->ldev->backing_bdev; backing_limit = b->merge_bvec_fn(b, bvm, bvec); limit = min(limit, backing_limit); } |