mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
Btrfs: skip allocation attempt from empty cluster
If we don't have a cluster, don't bother trying to allocate from it, jumping right away to the attempt to allocate a new cluster. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
425d83156c
commit
be064d1139
@ -5299,9 +5299,9 @@ alloc:
|
||||
* people trying to start a new cluster
|
||||
*/
|
||||
spin_lock(&last_ptr->refill_lock);
|
||||
if (last_ptr->block_group &&
|
||||
(last_ptr->block_group->ro ||
|
||||
!block_group_bits(last_ptr->block_group, data)))
|
||||
if (!last_ptr->block_group ||
|
||||
last_ptr->block_group->ro ||
|
||||
!block_group_bits(last_ptr->block_group, data))
|
||||
goto refill_cluster;
|
||||
|
||||
offset = btrfs_alloc_from_cluster(block_group, last_ptr,
|
||||
|
Loading…
Reference in New Issue
Block a user