|
@@ -571,7 +571,8 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry,
|
|
|
ret = btrfs_commit_transaction(trans,
|
|
ret = btrfs_commit_transaction(trans,
|
|
|
root->fs_info->extent_root);
|
|
root->fs_info->extent_root);
|
|
|
}
|
|
}
|
|
|
- BUG_ON(ret);
|
|
|
|
|
|
|
+ if (ret)
|
|
|
|
|
+ goto fail;
|
|
|
|
|
|
|
|
ret = pending_snapshot->error;
|
|
ret = pending_snapshot->error;
|
|
|
if (ret)
|
|
if (ret)
|