瀏覽代碼

dm space map metadata: fix sm_bootstrap_get_count()

Must set 'result' accordingly rather than return it.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Joe Thornber 10 年之前
父節點
當前提交
02717d9855
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/md/persistent-data/dm-space-map-metadata.c

+ 3 - 1
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);
 	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,
 static int sm_bootstrap_count_is_more_than_one(struct dm_space_map *sm,