diff options
Diffstat (limited to 'drivers/md/md-linear.c')
| -rw-r--r-- | drivers/md/md-linear.c | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c index 7354466ddc90..c766c559d36d 100644 --- a/drivers/md/md-linear.c +++ b/drivers/md/md-linear.c @@ -258,6 +258,11 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)  		     bio_sector < start_sector))  		goto out_of_bounds; +	if (unlikely(is_mddev_broken(tmp_dev->rdev, "linear"))) { +		bio_io_error(bio); +		return true; +	} +  	if (unlikely(bio_end_sector(bio) > end_sector)) {  		/* This bio crosses a device boundary, so we have to split it */  		struct bio *split = bio_split(bio, end_sector - bio_sector,  |