Josef Bacik 80ee54bfe8 btrfs: fix insert_reserved error handling
We were not handling the reserved byte accounting properly for data
references.  Metadata was fine, if it errored out the error paths would
free the bytes_reserved count and pin the extent, but it even missed one
of the error cases.  So instead move this handling up into
run_one_delayed_ref so we are sure that both cases are properly cleaned
up in case of a transaction abort.

CC: stable@vger.kernel.org # 4.18+
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-19 12:20:03 +02:00
..
2018-10-15 17:23:33 +02:00
2018-08-06 13:12:43 +02:00
2018-04-12 16:29:55 +02:00
2018-03-26 15:09:39 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00
2018-08-06 13:12:43 +02:00