Commit 186b524
btrfs: fix insert_reserved error handling
commit 80ee54b upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 5a1e9bf commit 186b524
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 | | |
| |||
7977 | 7980 | | |
7978 | 7981 | | |
7979 | 7982 | | |
7980 | | - | |
7981 | | - | |
7982 | | - | |
7983 | | - | |
| 7983 | + | |
7984 | 7984 | | |
7985 | | - | |
7986 | 7985 | | |
7987 | 7986 | | |
7988 | 7987 | | |
7989 | 7988 | | |
7990 | 7989 | | |
7991 | 7990 | | |
7992 | | - | |
7993 | | - | |
7994 | | - | |
7995 | 7991 | | |
7996 | 7992 | | |
7997 | 7993 | | |
| |||
0 commit comments