aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-10-22 15:51:44 -0400
committerChris Mason <chris.mason@fusionio.com>2012-10-25 15:59:57 -0400
commitc37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 (patch)
tree209184d0bcc2983b49c44bd63c6cb78a458e46af /fs/btrfs
parent7bfdcf7fbad56c0f1fc3e2d26431bed72bdcce2d (diff)
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, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index da518ded34bd..84bb4de1bb80 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -571,7 +571,8 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry,
571 ret = btrfs_commit_transaction(trans, 571 ret = btrfs_commit_transaction(trans,
572 root->fs_info->extent_root); 572 root->fs_info->extent_root);
573 } 573 }
574 BUG_ON(ret); 574 if (ret)
575 goto fail;
575 576
576 ret = pending_snapshot->error; 577 ret = pending_snapshot->error;
577 if (ret) 578 if (ret)