summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-10-22 21:51:44 +0200
committerChris Mason <chris.mason@fusionio.com>2012-10-25 21:59:57 +0200
commitc37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 (patch)
tree209184d0bcc2983b49c44bd63c6cb78a458e46af /fs
parentBtrfs: fix memory leak when cloning root's node (diff)
downloadlinux-c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2.tar.xz
linux-c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2.zip
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')
-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,
ret = btrfs_commit_transaction(trans,
root->fs_info->extent_root);
}
- BUG_ON(ret);
+ if (ret)
+ goto fail;
ret = pending_snapshot->error;
if (ret)