From nobody Sat Jul 25 04:29:54 2026 Received: from va-2-40.ptr.blmpb.com (va-2-40.ptr.blmpb.com [209.127.231.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1121D12D1F1 for ; Sat, 18 Jul 2026 03:42:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.231.40 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784346183; cv=none; b=LXGI5VHfCUdSO7b3J7VzHM9806Y1ulrW3KvlFgAbPRSH5DxpO9n3jXYQehN3FO4LFJUA0nUrU60Fb1IkKxkh4+BAHWQfKwp3V28qN3L4nf76MRVigEYst17N6n4ON4cv9Jtj6D0eOybiHaKSmOlIfesxvsW6FaTx8iXVJwJQCSY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784346183; c=relaxed/simple; bh=bLC49C1y2Zrv8Szte5dF0aZO55IyksZVXSqvwCHgkGM=; h=From:Message-Id:Cc:Subject:To:Date:Mime-Version:Content-Type; b=sdBcre+kiB7LMgN5QBVC2io34yQOH7s3JuuREpZGfKXbM3V3O/KjfM3WNmpxuRfQBquBzmIjtrJOAk4RkWWWE21tpxRn1jwDWqGshVX6iFYN/WaOrEvmc9qz3egYmWe8hCrz9ujLoBALqcuHsW2CvjLq2+3hi0nbbeCwnhDm27g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fnnas.com; spf=pass smtp.mailfrom=fnnas.com; dkim=pass (2048-bit key) header.d=fnnas-com.20200927.dkim.feishu.cn header.i=@fnnas-com.20200927.dkim.feishu.cn header.b=RsZoz9k/; arc=none smtp.client-ip=209.127.231.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fnnas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fnnas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fnnas-com.20200927.dkim.feishu.cn header.i=@fnnas-com.20200927.dkim.feishu.cn header.b="RsZoz9k/" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=fnnas-com.20200927.dkim.feishu.cn; t=1784346169; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=YM4PnXM/j1vE5qfrs53d3v7JkyDKT4G0ya55CDBjepQ=; b=RsZoz9k/b0HmChhN7xXY757iGga8faHc0W27hPwcLE0V/EX63TgjGz116l08W71n9hI3qZ JaqnyBGS40/FGFNXCn+IHFmgjPv2cSHshwZ72lTXOP1K7YyftspyeV3Z8KuDWaDkLvzoEu V8ZdTi5UCwOsyT8CFV2D9wnhG9LS9TbIlwsqyyz+Z46Z+Deb2jLzI0QJN7X1g+A8dE+1c7 8u1pnNy+NPNELmWq+VWwhuufnoBqnwdUlONb2+5atW8AXF98fmZoILGPFKQe33m+Bl3fAi Rvw0iHW3ZCgJ0GRx7N2xrugvt9VLdVVgwgxLPVwOpbW1pttGXiJym47Io4pmRA== From: "Chen Cheng" Message-Id: <20260718034236.4119093-1-chencheng@fnnas.com> Received: from fedora ([183.34.161.69]) by smtp.feishu.cn with ESMTPS; Sat, 18 Jul 2026 11:42:47 +0800 Cc: , , Subject: [PATCH] md/bitmap: resume array on backlog_store() error path Content-Transfer-Encoding: quoted-printable X-Original-From: chencheng@fnnas.com To: , Date: Sat, 18 Jul 2026 11:42:36 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Lms-Return-Path: X-Mailer: git-send-email 2.54.0 Content-Type: text/plain; charset="utf-8" From: Chen Cheng backlog_store() suspends the array before checking whether a write-mostly device exists. If no such device exists, the error path only unlocks reconfig_mutex and leaves the array suspended, blocking subsequent I/O. Use mddev_unlock_and_resume() to release both states. Fixes: 58226942ad3d ("md: use new apis to suspend array before mddev_create= /destroy_serial_pool") Signed-off-by: Chen Cheng Reviewed-by: Yu Kuai --- drivers/md/md-bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 028b9ca8ce52..3e40cb45d473 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -2854,11 +2854,11 @@ backlog_store(struct mddev *mddev, const char *buf,= size_t len) } } if (!has_write_mostly) { pr_warn_ratelimited("%s: can't set backlog, no write mostly device avail= able\n", mdname(mddev)); - mddev_unlock(mddev); + mddev_unlock_and_resume(mddev); return -EINVAL; } =20 mddev->bitmap_info.max_write_behind =3D backlog; if (!backlog && mddev->serial_info_pool) { --=20 2.54.0