From: Josef Bacik Date: Mon, 22 Oct 2012 19:51:44 +0000 (-0400) Subject: Btrfs: do not bug when we fail to commit the transaction X-Git-Tag: v3.7-rc3~21^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 --- 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)