mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
writecache: fix lv_on_pmem
dev_is_pmem on pv->dev requires a pv segment or it could segfault.
This commit is contained in:
parent
b725b5ea6e
commit
247f69f9aa
@ -4412,6 +4412,9 @@ int lv_on_pmem(struct logical_volume *lv)
|
||||
|
||||
dm_list_iterate_items(seg, &lv->segments) {
|
||||
for (s = 0; s < seg->area_count; s++) {
|
||||
if (seg_type(seg, s) != AREA_PV)
|
||||
continue;
|
||||
|
||||
pv = seg_pv(seg, s);
|
||||
|
||||
if (dev_is_pmem(lv->vg->cmd->dev_types, pv->dev)) {
|
||||
|
Loading…
Reference in New Issue
Block a user