aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-02-09 14:12:10 +0800
committerMark Brown <broonie@kernel.org>2015-02-09 14:12:10 +0800
commiteff6a902ff6b8a42f768c4b78fc63b9b8d0a41d9 (patch)
tree30e8be36bf1402fc30696cdb1599598c6cf7d837 /drivers/md/dm-thin.c
parenta779989fd4ccf6a58237ab3932559d8e60e157b6 (diff)
parent4ccf212fb84d79b75fc66a2e26ac6bdbab0aedbf (diff)
Merge tag 'v3.14.32' into linux-linaro-lsk-v3.14
This is the 3.14.32 stable release
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r--drivers/md/dm-thin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index f7e052c7ab5f..c1120eb96d86 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -2744,6 +2744,12 @@ static int pool_message(struct dm_target *ti, unsigned argc, char **argv)
struct pool_c *pt = ti->private;
struct pool *pool = pt->pool;
+ if (get_pool_mode(pool) >= PM_READ_ONLY) {
+ DMERR("%s: unable to service pool target messages in READ_ONLY or FAIL mode",
+ dm_device_name(pool->pool_md));
+ return -EINVAL;
+ }
+
if (!strcasecmp(argv[0], "create_thin"))
r = process_create_thin_mesg(argc, argv, pool);