diff options
author | Josef Bacik <[email protected]> | 2020-10-23 09:58:06 -0400 |
---|---|---|
committer | David Sterba <[email protected]> | 2020-12-08 15:54:02 +0100 |
commit | 2ca08c56e813323ee470f7fd8d836f30600e3960 (patch) | |
tree | 61746db82d5df67a1e90219b62a4c71c4dfb36d0 /lib/test_stackinit.c | |
parent | 27d56e62e4748c2135650c260024e9904b8c1a0a (diff) |
btrfs: explicitly protect ->last_byte_to_unpin in unpin_extent_range
Currently unpin_extent_range happens in the transaction commit context,
so we are protected from ->last_byte_to_unpin changing while we're
unpinning, because any new transactions would have to wait for us to
complete before modifying ->last_byte_to_unpin.
However in the future we may want to change how this works, for instance
with async unpinning or other such TODO items. To prepare for that
future explicitly protect ->last_byte_to_unpin with the commit_root_sem
so we are sure it won't change while we're doing our work.
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/test_stackinit.c')
0 files changed, 0 insertions, 0 deletions