mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cleanup: use last_seg
More readable code.
This commit is contained in:
parent
a55d4b6051
commit
6d1c983122
@ -3149,9 +3149,8 @@ static int _allocate(struct alloc_handle *ah,
|
|||||||
if (ah->alloc == ALLOC_CONTIGUOUS)
|
if (ah->alloc == ALLOC_CONTIGUOUS)
|
||||||
can_split = 0;
|
can_split = 0;
|
||||||
|
|
||||||
if (lv && !dm_list_empty(&lv->segments))
|
if (lv)
|
||||||
prev_lvseg = dm_list_item(dm_list_last(&lv->segments),
|
prev_lvseg = last_seg(lv);
|
||||||
struct lv_segment);
|
|
||||||
/*
|
/*
|
||||||
* Build the sets of available areas on the pv's.
|
* Build the sets of available areas on the pv's.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user