Skip to contentSkip to conversation

block: missing break in process_queued_bios()

PATCH In review Dan Carpenter 4 participants 4 messages Jun 14, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: missing break in process_queued_bios()

This used to be a fall through case, but we shifted code around and I think we want a break here now.

Fixes 4e4cbee93d56 ("block: switch bios to blk_status_t")
drivers/md/dm-mpath.c +1 -0
index a7d2e0840cc5..0e8ab5bb3575 100644
@@ -625,6 +625,7 @@ static void process_queued_bios(struct work_struct *work)
 		case DM_MAPIO_KILL:
 			bio->bi_status = BLK_STS_IOERR;
 			bio_endio(bio);
+			break;
 		case DM_MAPIO_REQUEUE:
 			bio->bi_status = BLK_STS_DM_REQUEUE;
 			bio_endio(bio);
Acked-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 11 lines · Dan Carpenter

This used to be a fall through case, but we shifted code around and I think we want a break here now.

Fixes 4e4cbee93d56 ("block: switch bios to blk_status_t")
drivers/md/dm-mpath.c +0 -0
index a7d2e0840cc5..0e8ab5bb3575 100644

drivers/md/dm-mpath.c static void process_queued_bios(struct work_struct *work) · line 631

Quoted 7 lines
drivers/md/dm-mpath.c +1 -0
@@ -625,6 +625,7 @@ static void process_queued_bios(struct work_struct *work)
 		case DM_MAPIO_KILL:
 			bio->bi_status = BLK_STS_IOERR;
 			bio_endio(bio);
+			break;
 		case DM_MAPIO_REQUEUE:
 			bio->bi_status = BLK_STS_DM_REQUEUE;
 			bio_endio(bio);

Annoyed with myself for missing this during my review...

The subject should be:
"dm mpath: add missing break in process_queued_bios()"

Also, this should go through Jens and I'll rebase my linux-dm branches accordingly. Jens, please pick this up.

Thanks!

#3 lore raw
Quoted 24 lines · Mike Snitzer
Quoted 11 lines · Dan Carpenter

This used to be a fall through case, but we shifted code around and I think we want a break here now.

Fixes 4e4cbee93d56 ("block: switch bios to blk_status_t")
drivers/md/dm-mpath.c +0 -0
index a7d2e0840cc5..0e8ab5bb3575 100644

drivers/md/dm-mpath.c static void process_queued_bios(struct work_struct *work) · line 631

Quoted 7 lines
drivers/md/dm-mpath.c +1 -0
@@ -625,6 +625,7 @@ static void process_queued_bios(struct work_struct *work)
 		case DM_MAPIO_KILL:
 			bio->bi_status = BLK_STS_IOERR;
 			bio_endio(bio);
+			break;
 		case DM_MAPIO_REQUEUE:
 			bio->bi_status = BLK_STS_DM_REQUEUE;
 			bio_endio(bio);

Annoyed with myself for missing this during my review...

Quoted 7 lines

The subject should be:
"dm mpath: add missing break in process_queued_bios()"

Also, this should go through Jens and I'll rebase my linux-dm branches accordingly. Jens, please pick this up.

Thanks, I've added it to the 4.13 branch.

Signature · 1 line
Jens Axboe