Commit 84cd948c authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots

Not being able to delete an orphan item isn't a horrible thing.  The worst that
happens is the next time around we try and do the orphan cleanup and we can't
find the referenced object and just delete the item and move on.
Signed-off-by: default avatarJosef Bacik <>
parent 7e1fea73
......@@ -6309,9 +6309,13 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
BUG_ON(ret < 0);
if (ret > 0) {
ret = btrfs_del_orphan_item(trans, tree_root,
/* if we fail to delete the orphan item this time
* around, it'll get picked up the next time.
* The most common failure here is just -ENOENT.
btrfs_del_orphan_item(trans, tree_root,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment