1
0
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:
Zdenek Kabelac 2018-07-07 21:35:07 +02:00
parent a55d4b6051
commit 6d1c983122

View File

@ -3149,9 +3149,8 @@ static int _allocate(struct alloc_handle *ah,
if (ah->alloc == ALLOC_CONTIGUOUS)
can_split = 0;
if (lv && !dm_list_empty(&lv->segments))
prev_lvseg = dm_list_item(dm_list_last(&lv->segments),
struct lv_segment);
if (lv)
prev_lvseg = last_seg(lv);
/*
* Build the sets of available areas on the pv's.
*/