Skip to contentSkip to conversation

Btrfs: do not bug when we fail to commit the transaction

PATCH New Josef Bacik 1 participant 1 message Oct 22, 2012 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: do not bug when we fail to commit the transaction

We BUG if we fail to commit the transaction when creating a snapshot, which is just obnoxious. Remove the BUG_ON(). Thanks,

---
 fs/btrfs/ioctl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
fs/btrfs/ioctl.c +2 -1
index 3b8b509..8fcf9a5 100644
@@ -571,7 +571,8 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry,
 		ret = btrfs_commit_transaction(trans,
 					       root->fs_info->extent_root);
 	}
-	BUG_ON(ret);
+	if (ret)
+		goto fail;
 
 	ret = pending_snapshot->error;
 	if (ret)
Signature · 1 line
1.7.7.6