1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present

If the group_id passed to _stats_group_id_present is equal to the
special value DM_STATS_GROUP_NOT_PRESENT there is no need to perform
any further tests: return false immediately.
This commit is contained in:
Bryn M. Reeves 2017-01-25 15:10:59 +00:00
parent ca427a711a
commit 1c00bb5da3

View File

@ -261,6 +261,9 @@ static int _stats_group_id_present(const struct dm_stats *dms, uint64_t id)
{ {
struct dm_stats_group *group = NULL; struct dm_stats_group *group = NULL;
if (id == DM_STATS_GROUP_NOT_PRESENT)
return 0;
if (!dms || !dms->regions) if (!dms || !dms->regions)
return_0; return_0;