• Mike Snitzer's avatar
    dm: fix sparse "unexpected unlock" warnings in ioctl code · 956a4025
    Mike Snitzer authored
    Rename dm_get_live_table_for_ioctl to dm_grab_bdev_for_ioctl and have it
    do the dm_{get,put}_live_table() rather than split those operations.
    
    The dm_grab_bdev_for_ioctl() callers only care about the block_device
    associated with a singleton DM device so there isn't any need to retain
    a reference to the live DM table.  It is sufficient to:
    1) dm_get_live_table()
    2) bdgrab() the bdev associated with the singleton table's target
    3) dm_put_live_table()
    4) bdput() the bdev
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    956a4025
dm.c 85 KB