mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-14 13:34:43 +03:00
libdm: remove unnecessary backtrace in _stats_group_id_present()
It's not an error to call dm_stats_group_present() on a handle that contains no regions. This causes dmfilemap to log a false backtrace during shutdown if all regions are removed from the corresponding device: exiting _filemap_monitor_get_events() with deleted=0, check=0 waiting for FILEMAPD_WAIT dm message (253:1) [ opencount flush ] @stats_list dmstats [32768] (*1) <backtrace> Filemap group removed: exiting. Change this to only emit a backtrace if the handle is NULL.
This commit is contained in:
parent
fab088cbc7
commit
c98868181f
@ -264,9 +264,12 @@ static int _stats_group_id_present(const struct dm_stats *dms, uint64_t id)
|
||||
if (id == DM_STATS_GROUP_NOT_PRESENT)
|
||||
return 0;
|
||||
|
||||
if (!dms || !dms->regions)
|
||||
if (!dms)
|
||||
return_0;
|
||||
|
||||
if (!dms->regions)
|
||||
return 0;
|
||||
|
||||
if (id > dms->max_region)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user