do {
next = dm_get_next_target(dmt, next, &start, &length, &type,
¶ms);
- if (lv) {
- if (!(segh = dm_list_next(&lv->segments, segh))) {
- log_error("Number of segments in active LV %s "
- "does not match metadata", lv->name);
- goto out;
- }
- seg = dm_list_item(segh, struct lv_segment);
+
+ if (!(segh = dm_list_next(&lv->segments, segh))) {
+ log_error("Number of segments in active LV %s "
+ "does not match metadata", lv->name);
+ goto out;
}
+ seg = dm_list_item(segh, struct lv_segment);
if (!type || !params)
continue;
} while (next);
- if (lv && (segh = dm_list_next(&lv->segments, segh))) {
+ if ((segh = dm_list_next(&lv->segments, segh))) {
log_error("Number of segments in active LV %s does not "
"match metadata", lv->name);
goto out;
int dev_manager_preload(struct dev_manager *dm, struct logical_volume *lv,
unsigned origin_only, int *flush_required);
int dev_manager_deactivate(struct dev_manager *dm, struct logical_volume *lv);
-int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv);
+int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv) __attribute__((nonnull(1, 2)));
int dev_manager_mknodes(const struct logical_volume *lv);