Parcourir la source

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>
Josef Bacik il y a 13 ans
Parent
commit
c37b2b6269
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      fs/btrfs/ioctl.c

+ 2 - 1
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)