summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin-metadata.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2017-05-15 15:43:05 +0200
committerMike Snitzer <snitzer@redhat.com>2017-05-15 21:09:49 +0200
commit91bcdb92d39711d1adb40c26b653b7978d93eb98 (patch)
tree902e45cf68253df1cfbcd9414f9be854d3eda5c6 /drivers/md/dm-thin-metadata.c
parentdm cache policy smq: don't do any writebacks unless IDLE (diff)
downloadlinux-91bcdb92d39711d1adb40c26b653b7978d93eb98.tar.xz
linux-91bcdb92d39711d1adb40c26b653b7978d93eb98.zip
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 <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin-metadata.c')
-rw-r--r--drivers/md/dm-thin-metadata.c4
1 files changed, 2 insertions, 2 deletions
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;