diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-09 13:47:03 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-03 23:48:17 -0400 |
commit | c7483e3135ed77ab15e1af7099eef2de64cef338 (patch) | |
tree | 6b3197b3da5bef9b7b464fc0e7e33287e4bc4343 | |
parent | f0d7cc5c4ebc5fe1862ad6fc1812183726c2e623 (diff) |
bcachefs: Fix missing error handling in bch2_subvolume_delete()
This fixes an assertion when the transaction has been unexpectedly
restarted.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/subvolume.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c index b5b0f5e39f97..24244bc3d2fb 100644 --- a/fs/bcachefs/subvolume.c +++ b/fs/bcachefs/subvolume.c @@ -877,6 +877,8 @@ int bch2_subvolume_delete(struct btree_trans *trans, u32 subvolid) goto err; ret = bch2_snapshot_node_set_deleted(trans, snapid); + if (ret) + goto err; h = bch2_trans_kmalloc(trans, sizeof(*h)); ret = PTR_ERR_OR_ZERO(h); |