From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.12.y 2/6] super: skip dying superblocks early
Date: Sat, 8 Aug 2026 11:48:48 -0400 [thread overview]
Message-ID: <20260808154852.370323-2-sashal@kernel.org> (raw)
In-Reply-To: <20260808154852.370323-1-sashal@kernel.org>
From: Christian Brauner <brauner@kernel.org>
[ Upstream commit 6920e3388ba4c66b0468d43bb7a373f5fff15d35 ]
Make all iterators uniform by performing an early check whether the
superblock is dying.
Link: https://lore.kernel.org/r/20250329-work-freeze-v2-3-a47af37ecc3d@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Stable-dep-of: 749d7aa0377a ("super: fix emergency thaw deadlock on frozen block devices")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/super.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/super.c b/fs/super.c
index 5aabfcab4fc7d..f1714752e439b 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -925,6 +925,9 @@ void iterate_supers(void (*f)(struct super_block *, void *), void *arg)
list_for_each_entry(sb, &super_blocks, s_list) {
bool locked;
+ if (super_flags(sb, SB_DYING))
+ continue;
+
sb->s_count++;
spin_unlock(&sb_lock);
@@ -962,6 +965,9 @@ void iterate_supers_type(struct file_system_type *type,
hlist_for_each_entry(sb, &type->fs_supers, s_instances) {
bool locked;
+ if (super_flags(sb, SB_DYING))
+ continue;
+
sb->s_count++;
spin_unlock(&sb_lock);
--
2.53.0
next prev parent reply other threads:[~2026-08-08 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 13:54 FAILED: patch "[PATCH] super: fix emergency thaw deadlock on frozen block devices" failed to apply to 6.12-stable tree gregkh
2026-08-08 15:48 ` [PATCH 6.12.y 1/6] super: remove pointless s_root checks Sasha Levin
2026-08-08 15:48 ` Sasha Levin [this message]
2026-08-08 15:48 ` [PATCH 6.12.y 3/6] super: use a common iterator (Part 1) Sasha Levin
2026-08-08 15:48 ` [PATCH 6.12.y 4/6] super: use common iterator (Part 2) Sasha Levin
2026-08-08 15:48 ` [PATCH 6.12.y 5/6] fs/super: fix emergency thaw double-unlock of s_umount Sasha Levin
2026-08-08 15:48 ` [PATCH 6.12.y 6/6] super: fix emergency thaw deadlock on frozen block devices Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260808154852.370323-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox