library: normalized 'extents_free_all' use across APIs

With the way those 'extents_free_all' guys were coded,
there's no real need to check for a NULL this->extents
before calling 'em. That's how <stat> already does it.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2021-02-13 00:00:00 -06:00 committed by Craig Small
parent 6e5d4c8ec0
commit 0b689adde0
2 changed files with 2 additions and 4 deletions

View File

@ -691,8 +691,7 @@ static int diskstats_stacks_reconfig_maybe (
memcpy(this->items, items, sizeof(enum diskstats_item) * numitems);
this->items[numitems] = DISKSTATS_logical_end;
this->numitems = numitems + 1;
if (this->extents)
diskstats_extents_free_all(this);
diskstats_extents_free_all(this);
return 1;
}
return 0;

View File

@ -716,8 +716,7 @@ static int slabinfo_stacks_reconfig_maybe (
memcpy(this->items, items, sizeof(enum slabinfo_item) * numitems);
this->items[numitems] = SLABINFO_logical_end;
this->numitems = numitems + 1;
if (this->extents)
slabinfo_extents_free_all(this);
slabinfo_extents_free_all(this);
return 1;
}
return 0;