projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6e086e
)
dm thin metadata: check __commit_transaction()'s return
author
Mike Snitzer
<snitzer@redhat.com>
Mon, 15 Apr 2019 20:40:08 +0000
(16:40 -0400)
committer
Mike Snitzer
<snitzer@redhat.com>
Thu, 18 Apr 2019 20:18:33 +0000
(16:18 -0400)
Fix __reserve_metadata_snap() to return early if __commit_transaction()
fails.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin-metadata.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-thin-metadata.c
b/drivers/md/dm-thin-metadata.c
index ed3caceaed07c07c33e16b9038f0c3bffd7616d5..7381e477a945f7207f599de088ed477be3728585 100644
(file)
--- a/
drivers/md/dm-thin-metadata.c
+++ b/
drivers/md/dm-thin-metadata.c
@@
-1225,7
+1225,12
@@
static int __reserve_metadata_snap(struct dm_pool_metadata *pmd)
* We commit to ensure the btree roots which we increment in a
* moment are up to date.
*/
- __commit_transaction(pmd);
+ r = __commit_transaction(pmd);
+ if (r < 0) {
+ DMWARN("%s: __commit_transaction() failed, error = %d",
+ __func__, r);
+ return r;
+ }
/*
* Copy the superblock.