mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Allow pool_begin_object in empty pool.
This commit is contained in:
parent
83912faa1d
commit
67fb2a39a7
@ -138,8 +138,10 @@ int pool_begin_object(struct pool *p, size_t hint)
|
||||
p->object_len = 0;
|
||||
p->object_alignment = align;
|
||||
|
||||
_align_chunk(c, align);
|
||||
if (c->end - c->begin < hint) {
|
||||
if (c)
|
||||
_align_chunk(c, align);
|
||||
|
||||
if (!c || (c->begin > c->end) || (c->end - c->begin < hint)) {
|
||||
/* allocate a new chunk */
|
||||
c = _new_chunk(p,
|
||||
hint > (p->chunk_size - sizeof(struct chunk)) ?
|
||||
|
Loading…
Reference in New Issue
Block a user