Skip to content

Commit

Permalink
dm: remove invalid sparse __acquires and __releases annotations
Browse files Browse the repository at this point in the history
Fixes sparse warnings:
drivers/md/dm.c:508:12: warning: context imbalance in 'dm_prepare_ioctl' - wrong count at exit
drivers/md/dm.c:543:13: warning: context imbalance in 'dm_unprepare_ioctl' - wrong count at exit

Fixes: 971888c ("dm: hold DM table for duration of ioctl rather than use blkdev_get")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Mike Snitzer committed Dec 4, 2020
1 parent f05c440 commit bde3808
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ static int dm_blk_report_zones(struct gendisk *disk, sector_t sector,

static int dm_prepare_ioctl(struct mapped_device *md, int *srcu_idx,
struct block_device **bdev)
__acquires(md->io_barrier)
{
struct dm_target *tgt;
struct dm_table *map;
Expand Down Expand Up @@ -543,7 +542,6 @@ static int dm_prepare_ioctl(struct mapped_device *md, int *srcu_idx,
}

static void dm_unprepare_ioctl(struct mapped_device *md, int srcu_idx)
__releases(md->io_barrier)
{
dm_put_live_table(md, srcu_idx);
}
Expand Down

0 comments on commit bde3808

Please sign in to comment.