From: Joe Thornber Date: Mon, 1 Dec 2014 14:38:11 +0000 (+0000) Subject: dm space map metadata: fix sm_bootstrap_get_count() X-Git-Tag: firefly_0821_release~176^2~2776^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02717d9855400c12c6e338ce1f5c2e1310def49a;p=firefly-linux-kernel-4.4.55.git dm space map metadata: fix sm_bootstrap_get_count() Must set 'result' accordingly rather than return it. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/persistent-data/dm-space-map-metadata.c b/drivers/md/persistent-data/dm-space-map-metadata.c index f4e22bcc7fb8..e8a904298887 100644 --- a/drivers/md/persistent-data/dm-space-map-metadata.c +++ b/drivers/md/persistent-data/dm-space-map-metadata.c @@ -583,7 +583,9 @@ static int sm_bootstrap_get_count(struct dm_space_map *sm, dm_block_t b, { struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm); - return b < smm->begin ? 1 : 0; + *result = (b < smm->begin) ? 1 : 0; + + return 0; } static int sm_bootstrap_count_is_more_than_one(struct dm_space_map *sm,