dm space map metadata: fix sm_bootstrap_get_nr_blocks()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 29 Nov 2014 12:50:21 +0000 (15:50 +0300)
committerMike Snitzer <snitzer@redhat.com>
Mon, 1 Dec 2014 16:31:58 +0000 (11:31 -0500)
commitc1c6156fe4d4577444b769d7edd5dd503e57bbc9
tree410da4c22aa26df48d52c5c2bcd1292cc966ffbe
parent445559cdcb98a141f5de415b94fd6eaccab87e6d
dm space map metadata: fix sm_bootstrap_get_nr_blocks()

This function isn't right and it causes a static checker warning:

drivers/md/dm-thin.c:3016 maybe_resize_data_dev()
error: potentially using uninitialized 'sb_data_size'.

It should set "*count" and return zero on success the same as the
sm_metadata_get_nr_blocks() function does earlier.

Fixes: 3241b1d3e0aa ('dm: add persistent data library')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/persistent-data/dm-space-map-metadata.c