summaryrefslogtreecommitdiff
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2023-06-16 18:50:48 +0200
committerTheodore Ts'o <tytso@mit.edu>2023-07-29 18:11:13 -0400
commitd5d020b3294b69eaf3b8985e7a37ba237849c390 (patch)
treed12547e57f97a84a20b2768da8d7b457cc153dbd /fs/ext4/super.c
parent98175720c9ed3bac857b0364321517cc2d695a3f (diff)
ext4: use sb_rdonly() helper for checking read-only flag
sb_rdonly() helper instead of directly checking sb->s_flags. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230616165109.21695-2-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index ffc4fb73f133..19514f98e2fe 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -6084,7 +6084,7 @@ static void ext4_update_super(struct super_block *sb)
* the clock is set in the future, and this will cause e2fsck
* to complain and force a full file system check.
*/
- if (!(sb->s_flags & SB_RDONLY))
+ if (!sb_rdonly(sb))
ext4_update_tstamp(es, s_wtime);
es->s_kbytes_written =
cpu_to_le64(sbi->s_kbytes_written +
@@ -6675,7 +6675,7 @@ restore_opts:
* If there was a failing r/w to ro transition, we may need to
* re-enable quota
*/
- if ((sb->s_flags & SB_RDONLY) && !(old_sb_flags & SB_RDONLY) &&
+ if (sb_rdonly(sb) && !(old_sb_flags & SB_RDONLY) &&
sb_any_quota_suspended(sb))
dquot_resume(sb, -1);
sb->s_flags = old_sb_flags;