summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin-metadata.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-17 15:52:17 +0000
committerMark Brown <broonie@linaro.org>2014-01-17 15:52:17 +0000
commit81e53d0470878165a300d75ac06a5bc5eee543a2 (patch)
tree5fdaacfb350c5a290109f98ab29e9858f1f11469 /drivers/md/dm-thin-metadata.c
parent15e0964dc2a097de3cf518badf2237b6b6adf7fe (diff)
parentfcb4ed749c776a2ae89ca40343cbccb6f8981e60 (diff)
Merge branches 'topic/sc18is602' and 'topic/rspi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-bpw
Diffstat (limited to 'drivers/md/dm-thin-metadata.c')
-rw-r--r--drivers/md/dm-thin-metadata.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index 60bce435f4f..8a30ad54bd4 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1697,6 +1697,14 @@ void dm_pool_metadata_read_only(struct dm_pool_metadata *pmd)
up_write(&pmd->root_lock);
}
+void dm_pool_metadata_read_write(struct dm_pool_metadata *pmd)
+{
+ down_write(&pmd->root_lock);
+ pmd->read_only = false;
+ dm_bm_set_read_write(pmd->bm);
+ up_write(&pmd->root_lock);
+}
+
int dm_pool_register_metadata_threshold(struct dm_pool_metadata *pmd,
dm_block_t threshold,
dm_sm_threshold_fn fn,