Commit 7b4f36c
committed
block: ensure we hold a queue reference when using queue limits
q_usage_counter is the only thing preventing us from the limits changing
under us in __bio_split_to_limits, but blk_mq_submit_bio doesn't hold
it while calling into it.
Move the splitting inside the region where we know we've got a queue
reference. Ideally this could still remain a shared section of code, but
let's keep the fix simple and defer any refactoring here to later.
Reported-by: Christoph Hellwig <hch@lst.de>
Fixes: 900e080 ("block: move queue enter logic into blk_mq_submit_bio()")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 309ce67 commit 7b4f36c
1 file changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2964 | 2964 | | |
2965 | 2965 | | |
2966 | 2966 | | |
2967 | | - | |
2968 | | - | |
2969 | | - | |
2970 | | - | |
2971 | | - | |
2972 | | - | |
2973 | 2967 | | |
2974 | 2968 | | |
2975 | 2969 | | |
| |||
2978 | 2972 | | |
2979 | 2973 | | |
2980 | 2974 | | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
2981 | 2980 | | |
2982 | 2981 | | |
2983 | 2982 | | |
| |||
2988 | 2987 | | |
2989 | 2988 | | |
2990 | 2989 | | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
2991 | 2995 | | |
2992 | 2996 | | |
2993 | 2997 | | |
| |||
0 commit comments