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-Url: https://git.stricted.de/?a=commitdiff_plain;h=91bcdb92d39711d1adb40c26b653b7978d93eb98;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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;