Commit d6db294f authored by Joe Thornber's avatar Joe Thornber Committed by Mike Snitzer

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: default avatarJoe Thornber <ejt@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent db7b93e3
...@@ -187,13 +187,8 @@ static int sm_disk_new_block(struct dm_space_map *sm, dm_block_t *b) ...@@ -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) static int sm_disk_commit(struct dm_space_map *sm)
{ {
int r; int r;
dm_block_t nr_free;
struct sm_disk *smd = container_of(sm, struct sm_disk, sm); 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); r = sm_ll_commit(&smd->ll);
if (r) if (r)
return r; return r;
...@@ -202,10 +197,6 @@ static int sm_disk_commit(struct dm_space_map *sm) ...@@ -202,10 +197,6 @@ static int sm_disk_commit(struct dm_space_map *sm)
smd->begin = 0; smd->begin = 0;
smd->nr_allocated_this_transaction = 0; smd->nr_allocated_this_transaction = 0;
r = sm_disk_get_nr_free(sm, &nr_free);
if (r)
return r;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment