summaryrefslogtreecommitdiff
path: root/drivers/md/md-linear.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md-linear.c')
-rw-r--r--drivers/md/md-linear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c
index 68cac7d19278..63ed8329a98d 100644
--- a/drivers/md/md-linear.c
+++ b/drivers/md/md-linear.c
@@ -252,7 +252,7 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
start_sector + data_offset;
if (unlikely((bio_op(bio) == REQ_OP_DISCARD) &&
- !blk_queue_discard(bio->bi_disk->queue))) {
+ !blk_queue_discard(bio->bi_bdev->bd_disk->queue))) {
/* Just ignore it */
bio_endio(bio);
} else {