diff options
author | Filipe Manana <fdmanana@suse.com> | 2014-12-02 18:07:49 +0000 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-12-02 18:35:10 -0800 |
commit | 8dbcd10f6978ca3ccee2f43288d16b7b9da2fb2b (patch) | |
tree | 88a5485643a8487ca6e3358d65a0a6fb21fa88dc /fs/fuse | |
parent | 495e64f4fe0363bc79fa0dfb41c271787e01b5c3 (diff) | |
download | talos-op-linux-8dbcd10f6978ca3ccee2f43288d16b7b9da2fb2b.tar.gz talos-op-linux-8dbcd10f6978ca3ccee2f43288d16b7b9da2fb2b.zip |
Btrfs: fix unprotected deletion from pending_chunks list
On block group remove if the corresponding extent map was on the
transaction->pending_chunks list, we were deleting the extent map
from that list, through remove_extent_mapping(), without any
synchronization with chunk allocation (which iterates that list
and adds new elements to it). Fix this by ensure that this is done
while the chunk mutex is held, since that's the mutex that protects
the list in the chunk allocation code path.
This applies on top (depends on) of my previous patch titled:
"Btrfs: fix race between fs trimming and block group remove/allocation"
But the issue in fact was already present before that change, it only
became easier to hit after Josef's 3.18 patch that added automatic
removal of empty block groups.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/fuse')
0 files changed, 0 insertions, 0 deletions