summaryrefslogtreecommitdiffstats
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)
downloadop-kernel-dev-c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2.zip
op-kernel-dev-c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2.tar.gz
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 da518de..84bb4de 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,
ret = btrfs_commit_transaction(trans,
root->fs_info->extent_root);
}
- BUG_ON(ret);
+ if (ret)
+ goto fail;
ret = pending_snapshot->error;
if (ret)
OpenPOWER on IntegriCloud