aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2010-12-08 12:24:01 -0500
committerChris Mason <chris.mason@oracle.com>2010-12-10 16:29:04 -0500
commit84cd948cb11041f205242de457e680b9bb872a36 (patch)
tree479ac0dc057044a8b399c8c32f1c78641bd33740 /fs/btrfs
parent7e1fea731da8c1b5fcf5d8e157befd389b030760 (diff)
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: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index cec05e100142..41133b064d72 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -6309,9 +6309,13 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
6309 NULL, NULL); 6309 NULL, NULL);
6310 BUG_ON(ret < 0); 6310 BUG_ON(ret < 0);
6311 if (ret > 0) { 6311 if (ret > 0) {
6312 ret = btrfs_del_orphan_item(trans, tree_root, 6312 /* if we fail to delete the orphan item this time
6313 root->root_key.objectid); 6313 * around, it'll get picked up the next time.
6314 BUG_ON(ret); 6314 *
6315 * The most common failure here is just -ENOENT.
6316 */
6317 btrfs_del_orphan_item(trans, tree_root,
6318 root->root_key.objectid);
6315 } 6319 }
6316 } 6320 }
6317 6321