From d970b407fc0f4fba35fc31aab80ea6ea69788a52 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 25 Feb 2023 17:20:16 +0100 Subject: Merging upstream version 4.2+20230223. Signed-off-by: Daniel Baumann --- monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index e0d3be6..820a93d 100644 --- a/monitor.c +++ b/monitor.c @@ -22,7 +22,6 @@ #include "mdmon.h" #include #include -#include static char *array_states[] = { "clear", "inactive", "suspended", "readonly", "read-auto", @@ -312,6 +311,9 @@ static int check_for_cleared_bb(struct active_array *a, struct mdinfo *mdi) struct md_bb *bb; int i; + if (!ss->get_bad_blocks) + return -1; + /* * Get a list of bad blocks for an array, then read list of * acknowledged bad blocks from kernel and compare it against metadata -- cgit v1.2.3