1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

libdm: call preload callback only when success

Do not call node's preload callback, if there is
any failure during preload.
This commit is contained in:
Zdenek Kabelac 2014-02-23 23:10:36 +01:00
parent c132fc3ff6
commit 1911c61639
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.85 - Version 1.02.85 -
=================================== ===================================
Do not call callback when preload fails.
Wrap is_selinux_enabled() to be called just once. Wrap is_selinux_enabled() to be called just once.
Use correctly signed 64b constant when working with raid volumes. Use correctly signed 64b constant when working with raid volumes.
Exit dmeventd with pidfile cleanup instead of raising SIGKILL on DIE request. Exit dmeventd with pidfile cleanup instead of raising SIGKILL on DIE request.

View File

@ -2724,12 +2724,12 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
} }
if (update_devs_flag || if (update_devs_flag ||
(!dnode->info.exists && dnode->callback)) { (r && !dnode->info.exists && dnode->callback)) {
if (!dm_udev_wait(dm_tree_get_cookie(dnode))) if (!dm_udev_wait(dm_tree_get_cookie(dnode)))
stack; stack;
dm_tree_set_cookie(dnode, 0); dm_tree_set_cookie(dnode, 0);
if (!dnode->info.exists && dnode->callback && if (r && !dnode->info.exists && dnode->callback &&
!dnode->callback(dnode, DM_NODE_CALLBACK_PRELOADED, !dnode->callback(dnode, DM_NODE_CALLBACK_PRELOADED,
dnode->callback_data)) dnode->callback_data))
{ {