Commit a08ed9a
committed
block: fix double bio queue when merging in cached request path
When we attempt to merge off the cached request path, we return NULL if successful. This makes the caller believe that it's should allocate a new request, and hence we end up with the bio both merged and associated with a new request. This, predictably, leads to all sorts of crashes. Pass in a pointer to the bio pointer, and clear it for the merge case. Then the caller knows that the bio is already queued, and no new requests need to get allocated. Fixes: 5b13bc8 ("blk-mq: cleanup request allocation") Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 373b541 commit a08ed9a
1 file changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2731 | 2731 | | |
2732 | 2732 | | |
2733 | 2733 | | |
2734 | | - | |
| 2734 | + | |
2735 | 2735 | | |
2736 | 2736 | | |
2737 | 2737 | | |
| |||
2741 | 2741 | | |
2742 | 2742 | | |
2743 | 2743 | | |
2744 | | - | |
| 2744 | + | |
2745 | 2745 | | |
2746 | | - | |
| 2746 | + | |
| 2747 | + | |
2747 | 2748 | | |
2748 | | - | |
| 2749 | + | |
| 2750 | + | |
2749 | 2751 | | |
2750 | | - | |
| 2752 | + | |
2751 | 2753 | | |
2752 | 2754 | | |
2753 | | - | |
| 2755 | + | |
2754 | 2756 | | |
2755 | 2757 | | |
2756 | | - | |
| 2758 | + | |
2757 | 2759 | | |
2758 | 2760 | | |
2759 | 2761 | | |
| |||
2789 | 2791 | | |
2790 | 2792 | | |
2791 | 2793 | | |
2792 | | - | |
| 2794 | + | |
2793 | 2795 | | |
| 2796 | + | |
| 2797 | + | |
2794 | 2798 | | |
2795 | 2799 | | |
2796 | 2800 | | |
| |||
0 commit comments