mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Fix clvmd segfault when refresh_toolcontext fails. (brassow, bz 506986)
This commit is contained in:
parent
06bb53b1e8
commit
cb63efc6f9
@ -1,5 +1,6 @@
|
||||
Version 2.02.54 -
|
||||
=====================================
|
||||
Fix clvmd segfault when refresh_toolcontext fails.
|
||||
Remember to clear 'global lock held during cache refresh' state after use.
|
||||
Use udev flags support in LVM.
|
||||
Delay announcing mirror monitoring to syslog until initialisation succeeded.
|
||||
|
@ -601,20 +601,23 @@ int do_check_lvm1(const char *vgname)
|
||||
|
||||
int do_refresh_cache()
|
||||
{
|
||||
int ret;
|
||||
DEBUGLOG("Refreshing context\n");
|
||||
log_notice("Refreshing context");
|
||||
|
||||
pthread_mutex_lock(&lvm_lock);
|
||||
|
||||
ret = refresh_toolcontext(cmd);
|
||||
if (!refresh_toolcontext(cmd)) {
|
||||
pthread_mutex_unlock(&lvm_lock);
|
||||
return -1;
|
||||
}
|
||||
|
||||
init_full_scan_done(0);
|
||||
lvmcache_label_scan(cmd, 2);
|
||||
dm_pool_empty(cmd->mem);
|
||||
|
||||
pthread_mutex_unlock(&lvm_lock);
|
||||
|
||||
return ret==1?0:-1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user