--- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -995,7 +995,7 @@ int btrfs_split_ordered_extent(struct bt if (pre) ret = clone_ordered_extent(ordered, 0, pre); - if (post) + if (ret == 0 && post) ret = clone_ordered_extent(ordered, pre + ordered->disk_num_bytes, post);