diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 54114b4887ddd5d1cdb393df3a857dac88cac5ac..5f745eadf77dd07454ccb0c1d201124738cb4edc 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1159,8 +1159,10 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans, if (test_bit(BTRFS_ROOT_REF_COWS, &root->state)) { ret = btrfs_reloc_cow_block(trans, root, buf, cow); - if (ret) + if (ret) { + btrfs_abort_transaction(trans, root, ret); return ret; + } } if (buf == root->node) {