File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,12 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
466
466
struct bio * split = bio_split (bio ,
467
467
zone -> zone_end - bio -> bi_iter .bi_sector , GFP_NOIO ,
468
468
& mddev -> bio_set );
469
+
470
+ if (IS_ERR (split )) {
471
+ bio -> bi_status = errno_to_blk_status (PTR_ERR (split ));
472
+ bio_endio (bio );
473
+ return ;
474
+ }
469
475
bio_chain (split , bio );
470
476
submit_bio_noacct (bio );
471
477
bio = split ;
@@ -608,6 +614,12 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
608
614
if (sectors < bio_sectors (bio )) {
609
615
struct bio * split = bio_split (bio , sectors , GFP_NOIO ,
610
616
& mddev -> bio_set );
617
+
618
+ if (IS_ERR (split )) {
619
+ bio -> bi_status = errno_to_blk_status (PTR_ERR (split ));
620
+ bio_endio (bio );
621
+ return true;
622
+ }
611
623
bio_chain (split , bio );
612
624
raid0_map_submit_bio (mddev , bio );
613
625
bio = split ;
You can’t perform that action at this time.
0 commit comments