diff options
author | Harshad Shirwadkar <harshadshirwadkar@gmail.com> | 2020-11-05 19:59:09 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-11-06 23:01:05 -0500 |
commit | 9b5f6c9b83d912c63ef9fb486a052be79b06f8b0 (patch) | |
tree | 5d0127495732468728724cb2af09b387947abc74 /fs/ext4/fsync.c | |
parent | da0c5d2695265962f20099737348fcb3ff524d0f (diff) | |
download | linux-9b5f6c9b83d912c63ef9fb486a052be79b06f8b0.tar.bz2 |
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/fsync.c')
-rw-r--r-- | fs/ext4/fsync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index 81a545fd14a3..a42ca95840f2 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -143,7 +143,7 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) if (sb_rdonly(inode->i_sb)) { /* Make sure that we read updated s_mount_flags value */ smp_rmb(); - if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) + if (ext4_test_mount_flag(inode->i_sb, EXT4_MF_FS_ABORTED)) ret = -EROFS; goto out; } |