diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-19 22:52:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-19 22:56:59 -0400 |
commit | 2252eecec7e072dfdc66cfea6da0ee6ed648a858 (patch) | |
tree | 7c04fb667decc377f98fb7cdd963faaed523a9f3 /libbcachefs/subvolume.c | |
parent | 6a34032417d9bb90ead6f3b7bf891347bc4a1ed3 (diff) |
Update bcachefs sources to 24bdb6fed91c bcachefs: bch2_btree_id_str()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/subvolume.c')
-rw-r--r-- | libbcachefs/subvolume.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/libbcachefs/subvolume.c b/libbcachefs/subvolume.c index caf2dd7d..73ba22c2 100644 --- a/libbcachefs/subvolume.c +++ b/libbcachefs/subvolume.c @@ -230,7 +230,6 @@ static int __bch2_subvolume_delete(struct btree_trans *trans, u32 subvolid) { struct btree_iter iter; struct bkey_s_c_subvolume subvol; - struct btree_trans_commit_hook *h; u32 snapid; int ret = 0; @@ -246,22 +245,8 @@ static int __bch2_subvolume_delete(struct btree_trans *trans, u32 subvolid) snapid = le32_to_cpu(subvol.v->snapshot); - ret = bch2_btree_delete_at(trans, &iter, 0); - if (ret) - 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); - if (ret) - goto err; - - h->fn = bch2_delete_dead_snapshots_hook; - bch2_trans_commit_hook(trans, h); -err: + ret = bch2_btree_delete_at(trans, &iter, 0) ?: + bch2_snapshot_node_set_deleted(trans, snapid); bch2_trans_iter_exit(trans, &iter); return ret; } |