summaryrefslogtreecommitdiffstats
path: root/xlators/debug/io-stats
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/debug/io-stats')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 863f77a2ae1..d4dd786ab78 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -1039,6 +1039,8 @@ io_stats_dump_stats_to_dict (xlator_t *this, dict_t *resp,
goto out;
}
ret = dict_set_int32 (resp, "top-op", flags);
+ if (!list_cnt)
+ goto out;
LOCK (&list_head->lock);
{
list_for_each_entry (entry, &list_head->iosstats->list, list) {
@@ -2600,8 +2602,6 @@ notify (xlator_t *this, int32_t event, void *data, ...)
ret = dict_get_int32 (dict, "top-op", &top_op);
if (!ret) {
ret = dict_get_int32 (dict, "list-cnt", &list_cnt);
- if (!list_cnt)
- list_cnt = 100;
if (top_op > IOS_STATS_TYPE_NONE &&
top_op < IOS_STATS_TYPE_MAX)
ret = io_stats_dump_stats_to_dict (this, output,