diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-10-22 15:51:44 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-25 15:59:57 -0400 |
commit | c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 (patch) | |
tree | 209184d0bcc2983b49c44bd63c6cb78a458e46af /fs | |
parent | 7bfdcf7fbad56c0f1fc3e2d26431bed72bdcce2d (diff) | |
download | linux-stable-c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2.tar.gz linux-stable-c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2.tar.bz2 linux-stable-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.c | 3 |
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) |