ext4: Don't allow new groups to be added during block allocation
After we mark the blocks in the buddy cache as allocated, we need to ensure that we don't reinit the buddy cache until the block bitmap is updated. This commit achieves this by holding the group_info alloc_semaphore till ext4_mb_release_context Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
This commit is contained in:
committed by
Theodore Ts'o
parent
648f5879f5
commit
8556e8f3b6
@ -195,6 +195,11 @@ struct ext4_allocation_context {
|
||||
__u8 ac_op; /* operation, for history only */
|
||||
struct page *ac_bitmap_page;
|
||||
struct page *ac_buddy_page;
|
||||
/*
|
||||
* pointer to the held semaphore upon successful
|
||||
* block allocation
|
||||
*/
|
||||
struct rw_semaphore *alloc_semp;
|
||||
struct ext4_prealloc_space *ac_pa;
|
||||
struct ext4_locality_group *ac_lg;
|
||||
};
|
||||
|
Reference in New Issue
Block a user