diff options
author | Boris Burkov <[email protected]> | 2023-12-01 13:00:09 -0800 |
---|---|---|
committer | David Sterba <[email protected]> | 2023-12-06 22:32:40 +0100 |
commit | f63e1164b90b385cd832ff0fdfcfa76c3cc15436 (patch) | |
tree | 2ddef0ef594b5e497f4a1b291e413185c95187ec /lib/memory-notifier-error-inject.c | |
parent | 0ac1d13a55eb37d398b63e6ff6db4a09a2c9128c (diff) |
btrfs: free qgroup reserve when ORDERED_IOERR is set
An ordered extent completing is a critical moment in qgroup reserve
handling, as the ownership of the reservation is handed off from the
ordered extent to the delayed ref. In the happy path we release (unlock)
but do not free (decrement counter) the reservation, and the delayed ref
drives the free. However, on an error, we don't create a delayed ref,
since there is no ref to add. Therefore, free on the error path.
CC: [email protected] # 6.1+
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Boris Burkov <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions