aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin-metadata.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2012-03-07 14:09:44 -0500
committerAlasdair G Kergon <agk@redhat.com>2012-03-07 14:09:44 -0500
commitaf63bcb817cf708f53bcae6edc2e3fb7dd7d8051 (patch)
tree9c38899465b9bc3b8ae613b41a70ab0ff02030d1 /drivers/md/dm-thin-metadata.c
parent4469a5f387fdde956894137751a41473618a4a52 (diff)
dm thin metadata: decrement counter after removing mapped block
Correct the number of mapped sectors shown on a thin device's status line by decrementing td->mapped_blocks in __remove() each time a block is removed. Signed-off-by: Joe Thornber <ejt@redhat.com> Acked-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin-metadata.c')
-rw-r--r--drivers/md/dm-thin-metadata.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index 05b7ffc030ed..237571af77fd 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1224,6 +1224,8 @@ static int __remove(struct dm_thin_device *td, dm_block_t block)
1224 if (r) 1224 if (r)
1225 return r; 1225 return r;
1226 1226
1227 td->mapped_blocks--;
1228 td->changed = 1;
1227 pmd->need_commit = 1; 1229 pmd->need_commit = 1;
1228 1230
1229 return 0; 1231 return 0;