From: Niklas Cassel <niklas.cassel@xxxxxxx> The mixed stat functions are called in case option unified_rw_reporting=both was used. Patch 1/2 simplifies show_mixed_ddir_status(). Patch 2/2 moves common code from the mixed stat functions to a new helper. Changes since v3: -Add error handling for malloc() in the new helper. -Change the mixed stat functions to only call show_*() if the helper returned non-NULL. Changes since v2: -Make use of init_thread_stat(). Niklas Cassel (2): stat: remove duplicated code in show_mixed_ddir_status() stat: move unified=both mixed allocation and calculation to new helper stat.c | 235 +++++++++++---------------------------------------------- 1 file changed, 44 insertions(+), 191 deletions(-) -- 2.34.1