1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00

cleanup some ignored return values & 'stack's

This commit is contained in:
Alasdair Kergon 2009-08-03 11:20:15 +00:00
parent 4171d0c301
commit bce8cac1f4
3 changed files with 15 additions and 11 deletions

View File

@ -1133,10 +1133,11 @@ static int _clean_tree(struct dev_manager *dm, struct dm_tree_node *root)
dm_tree_set_cookie(root, 0);
if (!dm_tree_deactivate_children(root, uuid, strlen(uuid))) {
dm_udev_cleanup(dm_tree_get_cookie(root));
(void) dm_udev_cleanup(dm_tree_get_cookie(root));
return_0;
}
dm_udev_wait(dm_tree_get_cookie(root));
if (!dm_udev_wait(dm_tree_get_cookie(root)))
stack;
}
return 1;
@ -1171,10 +1172,11 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv, actio
/* Deactivate LV and all devices it references that nothing else has open. */
dm_tree_set_cookie(root, 0);
if (!dm_tree_deactivate_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1)) {
dm_udev_cleanup(dm_tree_get_cookie(root));
(void) dm_udev_cleanup(dm_tree_get_cookie(root));
goto_out;
}
dm_udev_wait(dm_tree_get_cookie(root));
if (!dm_udev_wait(dm_tree_get_cookie(root)))
stack;
if (!_remove_lv_symlinks(dm, root))
log_error("Failed to remove all device symlinks associated with %s.", lv->name);
break;
@ -1195,10 +1197,11 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv, actio
/* Preload any devices required before any suspensions */
dm_tree_set_cookie(root, 0);
if (!dm_tree_preload_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1)) {
dm_udev_cleanup(dm_tree_get_cookie(root));
(void) dm_udev_cleanup(dm_tree_get_cookie(root));
goto_out;
}
dm_udev_wait(dm_tree_get_cookie(root));
if (!dm_udev_wait(dm_tree_get_cookie(root)))
stack;
if (dm_tree_node_size_changed(root))
dm->flush_required = 1;
@ -1206,10 +1209,11 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv, actio
if (action == ACTIVATE) {
dm_tree_set_cookie(root, 0);
if (!dm_tree_activate_children(root, dlid, ID_LEN + sizeof(UUID_PREFIX) - 1)) {
dm_udev_cleanup(dm_tree_get_cookie(root));
(void) dm_udev_cleanup(dm_tree_get_cookie(root));
goto_out;
}
dm_udev_wait(dm_tree_get_cookie(root));
if (!dm_udev_wait(dm_tree_get_cookie(root)))
stack;
}
if (!_create_lv_symlinks(dm, root)) {

View File

@ -1065,7 +1065,7 @@ int dm_udev_cleanup(uint32_t cookie)
return 1;
if (!_get_cookie_sem(cookie, &semid))
return 0;
return_0;
return _udev_notify_sem_destroy(semid, cookie);
}

View File

@ -593,7 +593,7 @@ static int _create(int argc, char **argv, void *data __attribute((unused)))
goto out;
}
dm_udev_wait(cookie);
(void) dm_udev_wait(cookie);
r = 1;
@ -631,7 +631,7 @@ static int _rename(int argc, char **argv, void *data __attribute((unused)))
goto out;
}
dm_udev_wait(cookie);
(void) dm_udev_wait(cookie);
r = 1;