From: Kiyoshi Ueda Date: Thu, 10 Dec 2009 23:52:26 +0000 (+0000) Subject: dm: swap target postsuspend call and setting suspended flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d4471cb5c1ec426c0f24818b270dc7b3ad7e655;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jun'ichi Nomura Cc: Mike Anderson Signed-off-by: Alasdair G Kergon --- 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) * requests are being added to md->deferred list. */ - dm_table_postsuspend_targets(map); - set_bit(DMF_SUSPENDED, &md->flags); + dm_table_postsuspend_targets(map); + out: dm_table_put(map);