diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:46 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:46 +0000 |
commit | 8415e604452966f981f20cb4d8a8a30e38a772dd (patch) | |
tree | 0c111cf6c6ed487c9baee37275621097d57f5127 /drivers/md/persistent-data/dm-space-map-common.c | |
parent | 4b9c8ddadce3ec70fa5d93875adeda861b21c84e (diff) | |
parent | 29b5f720990fafc302a034468455426dd662e101 (diff) |
Merge tag 'v3.10.30' into linux-linaro-lsklsk-14.02
This is the 3.10.30 stable release
Diffstat (limited to 'drivers/md/persistent-data/dm-space-map-common.c')
-rw-r--r-- | drivers/md/persistent-data/dm-space-map-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c index 3e7a88d99eb0..0d240373ffab 100644 --- a/drivers/md/persistent-data/dm-space-map-common.c +++ b/drivers/md/persistent-data/dm-space-map-common.c @@ -245,6 +245,10 @@ int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks) return -EINVAL; } + /* + * We need to set this before the dm_tm_new_block() call below. + */ + ll->nr_blocks = nr_blocks; for (i = old_blocks; i < blocks; i++) { struct dm_block *b; struct disk_index_entry idx; @@ -252,6 +256,7 @@ int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks) r = dm_tm_new_block(ll->tm, &dm_sm_bitmap_validator, &b); if (r < 0) return r; + idx.blocknr = cpu_to_le64(dm_block_location(b)); r = dm_tm_unlock(ll->tm, b); @@ -266,7 +271,6 @@ int sm_ll_extend(struct ll_disk *ll, dm_block_t extra_blocks) return r; } - ll->nr_blocks = nr_blocks; return 0; } |