master - libdm: call preload callback only when success
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1911c61639164296d953eef6f1476a040648d5ec Commit: 1911c61639164296d953eef6f1476a040648d5ec Parent: c132fc3ff6d031c136528ef00ecfbed417dae941 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sun Feb 23 23:10:36 2014 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Feb 24 21:01:13 2014 +0100
libdm: call preload callback only when success
Do not call node's preload callback, if there is
any failure during preload.
--- WHATS_NEW_DM | 1 + libdm/libdm-deptree.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@ Version 1.02.85 - =================================== + Do not call callback when preload fails. Wrap is_selinux_enabled() to be called just once. Use correctly signed 64b constant when working with raid volumes. Exit dmeventd with pidfile cleanup instead of raising SIGKILL on DIE request.
libdm/libdm-deptree.c +2 -2
@@ -2724,12 +2724,12 @@ int dm_tree_preload_children(struct dm_tree_node *dnode, }if (update_devs_flag || - (!dnode->info.exists && dnode->callback)) { + (r && !dnode->info.exists && dnode->callback)) {if (!dm_udev_wait (dm_tree_get_cookie (dnode))) stack;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_data)) {