diff options
Diffstat (limited to 'drivers/md/persistent-data/dm-space-map-metadata.c')
-rw-r--r-- | drivers/md/persistent-data/dm-space-map-metadata.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-metadata.c b/drivers/md/persistent-data/dm-space-map-metadata.c index 1c959684caef..58fc1eef7499 100644 --- a/drivers/md/persistent-data/dm-space-map-metadata.c +++ b/drivers/md/persistent-data/dm-space-map-metadata.c | |||
@@ -384,12 +384,16 @@ static int sm_metadata_new_block(struct dm_space_map *sm, dm_block_t *b) | |||
384 | struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); | 384 | struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); |
385 | 385 | ||
386 | int r = sm_metadata_new_block_(sm, b); | 386 | int r = sm_metadata_new_block_(sm, b); |
387 | if (r) | 387 | if (r) { |
388 | DMERR("unable to allocate new metadata block"); | 388 | DMERR("unable to allocate new metadata block"); |
389 | return r; | ||
390 | } | ||
389 | 391 | ||
390 | r = sm_metadata_get_nr_free(sm, &count); | 392 | r = sm_metadata_get_nr_free(sm, &count); |
391 | if (r) | 393 | if (r) { |
392 | DMERR("couldn't get free block count"); | 394 | DMERR("couldn't get free block count"); |
395 | return r; | ||
396 | } | ||
393 | 397 | ||
394 | check_threshold(&smm->threshold, count); | 398 | check_threshold(&smm->threshold, count); |
395 | 399 | ||