From: Joe Thornber Date: Mon, 15 May 2017 13:43:05 +0000 (-0400) Subject: dm thin metadata: call precommit before saving the roots X-Git-Tag: MMI-PSA29.97-13-9~5578^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91bcdb92d39711d1adb40c26b653b7978d93eb98;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git dm thin metadata: call precommit before saving the roots These calls were the wrong way round in __write_initial_superblock. Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c index 0f0251d0d337..d31d18d9727c 100644 --- a/drivers/md/dm-thin-metadata.c +++ b/drivers/md/dm-thin-metadata.c @@ -484,11 +484,11 @@ static int __write_initial_superblock(struct dm_pool_metadata *pmd) if (r < 0) return r; - r = save_sm_roots(pmd); + r = dm_tm_pre_commit(pmd->tm); if (r < 0) return r; - r = dm_tm_pre_commit(pmd->tm); + r = save_sm_roots(pmd); if (r < 0) return r;