aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2009-12-10 18:52:26 -0500
committerAlasdair G Kergon <agk@redhat.com>2009-12-10 18:52:26 -0500
commit4d4471cb5c1ec426c0f24818b270dc7b3ad7e655 (patch)
tree37407a97b8a9a96bae462860b1ed5c13da3da24f /drivers/md/dm.c
parent61afef614b013ee1b767cdd10325acae1db1f4d2 (diff)
dm: swap target postsuspend call and setting suspended flag
This patch moves DMF_SUSPENDED flag set before postsuspend. No one should care about the ordering, because the flag set and the postsuspend are protected by a single lock, md->suspend_lock, and all strict flag-checkers take the lock. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 40e257fadac9..f2b993c43359 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2550,10 +2550,10 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
2550 * requests are being added to md->deferred list. 2550 * requests are being added to md->deferred list.
2551 */ 2551 */
2552 2552
2553 dm_table_postsuspend_targets(map);
2554
2555 set_bit(DMF_SUSPENDED, &md->flags); 2553 set_bit(DMF_SUSPENDED, &md->flags);
2556 2554
2555 dm_table_postsuspend_targets(map);
2556
2557out: 2557out:
2558 dm_table_put(map); 2558 dm_table_put(map);
2559 2559