diff options
author | Harshad Shirwadkar <harshadshirwadkar@gmail.com> | 2020-11-06 04:59:09 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-11-07 05:01:05 +0100 |
commit | 9b5f6c9b83d912c63ef9fb486a052be79b06f8b0 (patch) | |
tree | 5d0127495732468728724cb2af09b387947abc74 /fs/ext4/mballoc.c | |
parent | ext4: issue fsdev cache flush before starting fast commit (diff) | |
download | linux-9b5f6c9b83d912c63ef9fb486a052be79b06f8b0.tar.xz linux-9b5f6c9b83d912c63ef9fb486a052be79b06f8b0.zip |
ext4: make s_mount_flags modifications atomic
Fast commit file system states are recorded in
sbi->s_mount_flags. Fast commit expects these bit manipulations to be
atomic. This patch adds helpers to make those modifications atomic.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20201106035911.1942128-21-harshadshirwadkar@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index f067e83f149e..24af9ed5c3e5 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4477,7 +4477,7 @@ static inline void ext4_mb_show_pa(struct super_block *sb) { ext4_group_t i, ngroups; - if (EXT4_SB(sb)->s_mount_flags & EXT4_MF_FS_ABORTED) + if (ext4_test_mount_flag(sb, EXT4_MF_FS_ABORTED)) return; ngroups = ext4_get_groups_count(sb); @@ -4508,7 +4508,7 @@ static void ext4_mb_show_ac(struct ext4_allocation_context *ac) { struct super_block *sb = ac->ac_sb; - if (EXT4_SB(sb)->s_mount_flags & EXT4_MF_FS_ABORTED) + if (ext4_test_mount_flag(sb, EXT4_MF_FS_ABORTED)) return; mb_debug(sb, "Can't allocate:" |