diff mbox

[4/4] dm-mpath: reject message when the device is suspended

Message ID 4B06420D.3070702@ct.jp.nec.com (mailing list archive)
State Accepted, archived
Delegated to: Alasdair Kergon
Headers show

Commit Message

Kiyoshi Ueda Nov. 20, 2009, 7:15 a.m. UTC
None
diff mbox

Patch

Index: 2.6.32-rc7/drivers/md/dm-mpath.c
===================================================================
--- 2.6.32-rc7.orig/drivers/md/dm-mpath.c
+++ 2.6.32-rc7/drivers/md/dm-mpath.c
@@ -1421,6 +1421,11 @@  static int multipath_message(struct dm_t
 
 	mutex_lock(&m->work_mutex);
 
+	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);