summaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_dtree.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2015-05-18 19:11:40 +0100
committerChris Mason <clm@fb.com>2015-05-19 18:04:17 -0700
commita96295965b600f2dc6ad661c4803c86e87db3d7b (patch)
tree77d962c73ba063add20fcc8b47950be4c1ee75a2 /fs/jfs/jfs_dtree.c
parent2c2ed5aa0154c0be67f98c970de6b5587dbc045a (diff)
downloadop-kernel-dev-a96295965b600f2dc6ad661c4803c86e87db3d7b.zip
op-kernel-dev-a96295965b600f2dc6ad661c4803c86e87db3d7b.tar.gz
Btrfs: fix racy system chunk allocation when setting block group ro
If while setting a block group read-only we end up allocating a system chunk, through check_system_chunk(), we were not doing it while holding the chunk mutex which is a problem if a concurrent chunk allocation is happening, through do_chunk_alloc(), as it means both block groups can end up using the same logical addresses and physical regions in the device(s). So make sure we hold the chunk mutex. Cc: stable@vger.kernel.org # 4.0+ Fixes: 2f0810880f08 ("btrfs: delete chunk allocation attemp when setting block group ro") Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/jfs/jfs_dtree.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud