]> sourceware.org Git - lvm2.git/commitdiff
libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present
authorBryn M. Reeves <bmr@redhat.com>
Wed, 25 Jan 2017 15:10:59 +0000 (15:10 +0000)
committerBryn M. Reeves <bmr@redhat.com>
Wed, 25 Jan 2017 15:29:35 +0000 (15:29 +0000)
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.

libdm/libdm-stats.c

index 6e79a093571a177561a804c50c1c0f0407159232..f10c6d68654bcf1d5a536db782ed78874c5e69f2 100644 (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;
 
+       if (id == DM_STATS_GROUP_NOT_PRESENT)
+               return 0;
+
        if (!dms || !dms->regions)
                return_0;
 
This page took 0.035263 seconds and 5 git commands to generate.