Files
linux/fs/btrfs
Filipe Manana 68482f12d9 Btrfs: fix racy system chunk allocation when setting block group ro
commit a96295965b upstream.

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.

Fixes: 2f0810880f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-06 08:20:52 -07:00
..
2014-06-09 17:20:42 -07:00
2014-06-09 17:20:48 -07:00
2014-06-09 17:20:48 -07:00
2008-09-25 11:04:06 -04:00
2014-10-14 10:51:22 +02:00
2015-01-21 18:06:49 -08:00
2015-02-14 08:19:14 -08:00
2014-01-29 07:06:27 -08:00
2015-01-21 18:06:49 -08:00