Commit 80ee54b
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>1 parent 49940bd commit 80ee54b
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2366 | 2366 | | |
2367 | 2367 | | |
2368 | 2368 | | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
2369 | 2372 | | |
2370 | 2373 | | |
2371 | 2374 | | |
| |||
8004 | 8007 | | |
8005 | 8008 | | |
8006 | 8009 | | |
8007 | | - | |
8008 | | - | |
8009 | | - | |
8010 | | - | |
| 8010 | + | |
8011 | 8011 | | |
8012 | | - | |
8013 | 8012 | | |
8014 | 8013 | | |
8015 | 8014 | | |
8016 | 8015 | | |
8017 | 8016 | | |
8018 | 8017 | | |
8019 | | - | |
8020 | | - | |
8021 | | - | |
8022 | 8018 | | |
8023 | 8019 | | |
8024 | 8020 | | |
| |||
0 commit comments