fs: Provide helpers for manipulating sb->s_readonly_remount

Provide helpers to set and clear sb->s_readonly_remount including
appropriate memory barriers. Also use this opportunity to document what
the barriers pair with and why they are needed.

Suggested-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Message-Id: <20230620112832.5158-1-jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Jan Kara
2023-06-20 13:28:32 +02:00
committed by Christian Brauner
parent c541dce86c
commit d7439fb1f4
4 changed files with 64 additions and 21 deletions

View File

@@ -1248,7 +1248,7 @@ struct super_block {
*/
atomic_long_t s_fsnotify_connectors;
/* Being remounted read-only */
/* Read-only state of the superblock is being changed */
int s_readonly_remount;
/* per-sb errseq_t for reporting writeback errors via syncfs */