diff options
author | Joe Thornber <ejt@redhat.com> | 2021-03-09 15:56:59 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2021-04-19 18:36:46 +0200 |
commit | d6db294fd8194e05a82f368ad97f4efafbd04f2a (patch) | |
tree | ba268ae9f7d7f2f4add9a1b2ec89e1db943a4c78 /drivers/md/persistent-data | |
parent | dm integrity: add the "reset_recalculate" feature flag (diff) | |
download | linux-d6db294fd8194e05a82f368ad97f4efafbd04f2a.tar.xz linux-d6db294fd8194e05a82f368ad97f4efafbd04f2a.zip |
dm space map disk: remove redundant calls to sm_disk_get_nr_free()
Both sm_disk_new_block and sm_disk_commit are needlessly calling
sm_disk_get_nr_free(). Looks like old queries used for some
debugging.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data')
-rw-r--r-- | drivers/md/persistent-data/dm-space-map-disk.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-disk.c b/drivers/md/persistent-data/dm-space-map-disk.c index bf4c5e2ccb6f..61f56909e00b 100644 --- a/drivers/md/persistent-data/dm-space-map-disk.c +++ b/drivers/md/persistent-data/dm-space-map-disk.c @@ -187,13 +187,8 @@ static int sm_disk_new_block(struct dm_space_map *sm, dm_block_t *b) static int sm_disk_commit(struct dm_space_map *sm) { int r; - dm_block_t nr_free; struct sm_disk *smd = container_of(sm, struct sm_disk, sm); - r = sm_disk_get_nr_free(sm, &nr_free); - if (r) - return r; - r = sm_ll_commit(&smd->ll); if (r) return r; @@ -202,10 +197,6 @@ static int sm_disk_commit(struct dm_space_map *sm) smd->begin = 0; smd->nr_allocated_this_transaction = 0; - r = sm_disk_get_nr_free(sm, &nr_free); - if (r) - return r; - return 0; } |