mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Return immediately dm_lib_exit() if called more than once.
(Avoiding calling it twice would involve some untangling.) Decrement the new suspended_counter if removing a suspended device.
This commit is contained in:
parent
9e0edb7ee5
commit
f4249251cb
@ -1,5 +1,6 @@
|
||||
Version 1.02.65 -
|
||||
==================================
|
||||
Return immediately dm_lib_exit() if called more than once.
|
||||
Disable udev fallback by default and add --udevfallback option to dmsetup.
|
||||
Warn if a table is loaded while a device is known to be in suspended state.
|
||||
Add dm_get_suspended_counter() for number of devs in suspended state by lib.
|
||||
|
@ -2173,6 +2173,15 @@ void dm_pools_check_leaks(void);
|
||||
|
||||
void dm_lib_exit(void)
|
||||
{
|
||||
int suspended_counter;
|
||||
static unsigned _exited = 0;
|
||||
|
||||
if (_exited++)
|
||||
return;
|
||||
|
||||
if ((suspended_counter = dm_get_suspended_counter()))
|
||||
log_error("libdevmapper exiting with %d device(s) still suspended.", suspended_counter);
|
||||
|
||||
dm_lib_release();
|
||||
selinux_release();
|
||||
if (_dm_bitset)
|
||||
|
@ -1188,7 +1188,8 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
|
||||
info.minor);
|
||||
r = 0;
|
||||
continue;
|
||||
}
|
||||
} else if (info.suspended)
|
||||
dec_suspended();
|
||||
|
||||
if (dm_tree_node_num_children(child, 0)) {
|
||||
if (!_dm_tree_deactivate_children(child, uuid_prefix, uuid_prefix_len, level + 1))
|
||||
|
Loading…
Reference in New Issue
Block a user