From: Kiyoshi Ueda Date: Thu, 10 Dec 2009 23:52:27 +0000 (+0000) Subject: dm mpath: reject messages when device is suspended X-Git-Tag: upstream/snapshot3+hdmi~16136^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2f3d24b783fda20618b73d65678eb5dfae31a5d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git dm mpath: reject messages when device is suspended This patch rejects messages that can generate I/O while the device itself is suspended. Signed-off-by: Kiyoshi Ueda Cc: Mike Anderson Signed-off-by: Jun'ichi Nomura Signed-off-by: Alasdair G Kergon --- diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 45d9bf1..e81345a 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -1433,6 +1433,11 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) goto out; } + if (dm_suspended(ti)) { + r = -EBUSY; + goto out; + } + if (argc == 1) { if (!strnicmp(argv[0], MESG_STR("queue_if_no_path"))) { r = queue_if_no_path(m, 1, 0);