From: "Darrick J. Wong" <djwong@kernel.org>
To: jack@suse.cz, brauner@kernel.org
Cc: linux-api@vger.kernel.org, hch@lst.de,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, gabriel@krisman.be,
amir73il@gmail.com
Subject: [PATCH 7/6] fs: improve comment in fserror_alloc_event
Date: Tue, 6 Jan 2026 15:33:49 -0800 [thread overview]
Message-ID: <20260106233349.GL191501@frogsfrogsfrogs> (raw)
In-Reply-To: <176602332085.686273.7564676516217176769.stgit@frogsfrogsfrogs>
From: Darrick J. Wong <djwong@kernel.org>
Document the ordering requirements between SB_ACTIVE and
s_pending_errors in the new fserror code.
Cc: jack@suse.cz
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
fs/fserror.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/fserror.c b/fs/fserror.c
index ec92f5a6db59ce..06ca86adab9b76 100644
--- a/fs/fserror.c
+++ b/fs/fserror.c
@@ -79,6 +79,11 @@ static inline struct fserror_event *fserror_alloc_event(struct super_block *sb,
* If pending_errors already reached zero or is no longer active,
* the superblock is being deactivated so there's no point in
* continuing.
+ *
+ * The order of the check of s_pending_errors and SB_ACTIVE are
+ * mandated by order of accesses in generic_shutdown_super and
+ * fserror_unmount. Barriers are implicitly provided by the refcount
+ * manipulations in this function and fserror_unmount.
*/
if (!refcount_inc_not_zero(&sb->s_pending_errors))
return NULL;
next prev parent reply other threads:[~2026-01-06 23:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 2:02 [PATCHSET V4 1/2] fs: generic file IO error reporting Darrick J. Wong
2025-12-18 2:02 ` [PATCH 1/6] uapi: promote EFSCORRUPTED and EUCLEAN to errno.h Darrick J. Wong
2025-12-18 5:17 ` Christoph Hellwig
2025-12-18 11:04 ` Alejandro Colomar
2025-12-18 18:45 ` Darrick J. Wong
2025-12-18 9:33 ` Gao Xiang
2025-12-22 15:01 ` Jan Kara
2025-12-18 2:03 ` [PATCH 2/6] fs: report filesystem and file I/O errors to fsnotify Darrick J. Wong
2025-12-18 5:21 ` Christoph Hellwig
2025-12-18 18:44 ` Darrick J. Wong
2025-12-24 12:29 ` Christian Brauner
2026-01-06 16:42 ` Darrick J. Wong
2026-01-12 13:17 ` Christian Brauner
2026-01-12 18:50 ` Darrick J. Wong
2025-12-18 23:32 ` [PATCH V4.1 " Darrick J. Wong
2025-12-22 15:36 ` [PATCH " Jan Kara
2026-01-06 17:35 ` Darrick J. Wong
2025-12-18 2:03 ` [PATCH 3/6] iomap: report file I/O errors to the VFS Darrick J. Wong
2025-12-18 5:22 ` Christoph Hellwig
2025-12-22 15:30 ` Jan Kara
2025-12-18 2:03 ` [PATCH 4/6] xfs: report fs metadata errors via fsnotify Darrick J. Wong
2025-12-18 5:22 ` Christoph Hellwig
2025-12-18 2:03 ` [PATCH 5/6] xfs: translate fsdax media errors into file "data lost" errors when convenient Darrick J. Wong
2025-12-18 5:23 ` Christoph Hellwig
2025-12-18 2:04 ` [PATCH 6/6] ext4: convert to new fserror helpers Darrick J. Wong
2025-12-18 5:23 ` Christoph Hellwig
2025-12-22 15:34 ` Jan Kara
2026-01-06 17:30 ` Darrick J. Wong
2026-01-06 23:33 ` Darrick J. Wong [this message]
2026-01-07 9:19 ` [PATCH 7/6] fs: improve comment in fserror_alloc_event Jan Kara
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=20260106233349.GL191501@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=gabriel@krisman.be \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@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