summaryrefslogtreecommitdiff
path: root/fs/ext4/balloc.c
diff options
context:
space:
mode:
authorWang Shilong <wshilong@ddn.com>2018-07-29 17:27:45 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-07-29 17:27:45 -0400
commit9af0b3d1257756394ebbd06b14937b557e3a756b (patch)
tree5ed219a153d49a4691ea5d2f729d742e80a69173 /fs/ext4/balloc.c
parentf39b3f45dbcb0343822cce31ea7636ad66e60bc2 (diff)
ext4: fix race when setting the bitmap corrupted flag
Whenever we hit block or inode bitmap corruptions we set bit and then reduce this block group free inode/clusters counter to expose right available space. However some of ext4_mark_group_bitmap_corrupted() is called inside group spinlock, some are not, this could make it happen that we double reduce one block group free counters from system. Always hold group spinlock for it could fix it, but it looks a little heavy, we could use test_and_set_bit() to fix race problems here. Signed-off-by: Wang Shilong <wshilong@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/ext4/balloc.c')
0 files changed, 0 insertions, 0 deletions