mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
[device/bcache] fix bug in _alloc_block
This commit is contained in:
parent
1563b93691
commit
19647d1cd4
@ -449,8 +449,10 @@ static void _exit_free_list(struct bcache *cache)
|
|||||||
|
|
||||||
static struct block *_alloc_block(struct bcache *cache)
|
static struct block *_alloc_block(struct bcache *cache)
|
||||||
{
|
{
|
||||||
struct block *b = dm_list_struct_base(_list_pop(&cache->free), struct block, list);
|
if (dm_list_empty(&cache->free))
|
||||||
return b;
|
return NULL;
|
||||||
|
|
||||||
|
return dm_list_struct_base(_list_pop(&cache->free), struct block, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------
|
/*----------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user