diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 3f9a514b5b9d..807095f4c793 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -250,7 +250,7 @@ static DEFINE_SPINLOCK(all_mddevs_lock); | |||
250 | * call has finished, the bio has been linked into some internal structure | 250 | * call has finished, the bio has been linked into some internal structure |
251 | * and so is visible to ->quiesce(), so we don't need the refcount any more. | 251 | * and so is visible to ->quiesce(), so we don't need the refcount any more. |
252 | */ | 252 | */ |
253 | static void md_make_request(struct request_queue *q, struct bio *bio) | 253 | static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio) |
254 | { | 254 | { |
255 | const int rw = bio_data_dir(bio); | 255 | const int rw = bio_data_dir(bio); |
256 | struct mddev *mddev = q->queuedata; | 256 | struct mddev *mddev = q->queuedata; |
@@ -262,13 +262,13 @@ static void md_make_request(struct request_queue *q, struct bio *bio) | |||
262 | if (mddev == NULL || mddev->pers == NULL | 262 | if (mddev == NULL || mddev->pers == NULL |
263 | || !mddev->ready) { | 263 | || !mddev->ready) { |
264 | bio_io_error(bio); | 264 | bio_io_error(bio); |
265 | return; | 265 | return BLK_QC_T_NONE; |
266 | } | 266 | } |
267 | if (mddev->ro == 1 && unlikely(rw == WRITE)) { | 267 | if (mddev->ro == 1 && unlikely(rw == WRITE)) { |
268 | if (bio_sectors(bio) != 0) | 268 | if (bio_sectors(bio) != 0) |
269 | bio->bi_error = -EROFS; | 269 | bio->bi_error = -EROFS; |
270 | bio_endio(bio); | 270 | bio_endio(bio); |
271 | return; | 271 | return BLK_QC_T_NONE; |
272 | } | 272 | } |
273 | smp_rmb(); /* Ensure implications of 'active' are visible */ | 273 | smp_rmb(); /* Ensure implications of 'active' are visible */ |
274 | rcu_read_lock(); | 274 | rcu_read_lock(); |
@@ -302,6 +302,8 @@ static void md_make_request(struct request_queue *q, struct bio *bio) | |||
302 | 302 | ||
303 | if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended) | 303 | if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended) |
304 | wake_up(&mddev->sb_wait); | 304 | wake_up(&mddev->sb_wait); |
305 | |||
306 | return BLK_QC_T_NONE; | ||
305 | } | 307 | } |
306 | 308 | ||
307 | /* mddev_suspend makes sure no new requests are submitted | 309 | /* mddev_suspend makes sure no new requests are submitted |