Commit fbbd5d3
nullblk: Fix cleanup order in null_add_dev() error path
In null_add_dev(), if an error happen after initializing the resources
for a zoned null block device, we must free these resources before
exiting the function. To ensure this, move the out_cleanup_zone label
after out_cleanup_disk as we jump to this latter label if an error
happens after calling null_init_zoned_dev().
Fixes: e440626 ("null_blk: pass queue_limits to blk_mq_alloc_disk")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240330005300.1503252-1-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 39cd87c commit fbbd5d3
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1965 | 1965 | | |
1966 | 1966 | | |
1967 | 1967 | | |
1968 | | - | |
1969 | | - | |
1970 | 1968 | | |
1971 | 1969 | | |
| 1970 | + | |
| 1971 | + | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
| |||
0 commit comments