Skip to content
  • Jens Axboe's avatar
    block: fix stacked driver stats init and free · a83b576c
    Jens Axboe authored
    If a driver allocates a queue for stacked usage, then it does
    not currently get stats allocated. This causes the later init
    of, eg, writeback throttling to blow up. Move the init to the
    queue allocation instead.
    
    Additionally, allow a NULL callback unregistration. This avoids
    having the caller check for that, fixing another oops on
    removal of a block device that doesn't have poll stats allocated.
    
    Fixes: 34dbad5d
    
     ("blk-stat: convert to callback-based statistics reporting")
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    a83b576c