diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 21:54:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 21:54:01 -0400 |
commit | 0f0d12728e56c94d3289c6831243b6faeae8a19d (patch) | |
tree | bd52fd4ed6fba2a0d8bb95e7fc33f51ac299001d /fs/ext4 | |
parent | 581bfce969cbfc7ce43ee92273be9cb7c3fdfa61 (diff) | |
parent | e462ec50cb5fad19f6003a3d8087f4a0945dd2b1 (diff) |
Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull mount flag updates from Al Viro:
"Another chunk of fmount preparations from dhowells; only trivial
conflicts for that part. It separates MS_... bits (very grotty
mount(2) ABI) from the struct super_block ->s_flags (kernel-internal,
only a small subset of MS_... stuff).
This does *not* convert the filesystems to new constants; only the
infrastructure is done here. The next step in that series is where the
conflicts would be; that's the conversion of filesystems. It's purely
mechanical and it's better done after the merge, so if you could run
something like
list=$(for i in MS_RDONLY MS_NOSUID MS_NODEV MS_NOEXEC MS_SYNCHRONOUS MS_MANDLOCK MS_DIRSYNC MS_NOATIME MS_NODIRATIME MS_SILENT MS_POSIXACL MS_KERNMOUNT MS_I_VERSION MS_LAZYTIME; do git grep -l $i fs drivers/staging/lustre drivers/mtd ipc mm include/linux; done|sort|uniq|grep -v '^fs/namespace.c$')
sed -i -e 's/\<MS_RDONLY\>/SB_RDONLY/g' \
-e 's/\<MS_NOSUID\>/SB_NOSUID/g' \
-e 's/\<MS_NODEV\>/SB_NODEV/g' \
-e 's/\<MS_NOEXEC\>/SB_NOEXEC/g' \
-e 's/\<MS_SYNCHRONOUS\>/SB_SYNCHRONOUS/g' \
-e 's/\<MS_MANDLOCK\>/SB_MANDLOCK/g' \
-e 's/\<MS_DIRSYNC\>/SB_DIRSYNC/g' \
-e 's/\<MS_NOATIME\>/SB_NOATIME/g' \
-e 's/\<MS_NODIRATIME\>/SB_NODIRATIME/g' \
-e 's/\<MS_SILENT\>/SB_SILENT/g' \
-e 's/\<MS_POSIXACL\>/SB_POSIXACL/g' \
-e 's/\<MS_KERNMOUNT\>/SB_KERNMOUNT/g' \
-e 's/\<MS_I_VERSION\>/SB_I_VERSION/g' \
-e 's/\<MS_LAZYTIME\>/SB_LAZYTIME/g' \
$list
and commit it with something along the lines of 'convert filesystems
away from use of MS_... constants' as commit message, it would save a
quite a bit of headache next cycle"
* 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
VFS: Differentiate mount flags (MS_*) from internal superblock flags
VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)
vfs: Add sb_rdonly(sb) to query the MS_RDONLY flag on s_flags
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ext4_jbd2.c | 2 | ||||
-rw-r--r-- | fs/ext4/file.c | 2 | ||||
-rw-r--r-- | fs/ext4/fsync.c | 2 | ||||
-rw-r--r-- | fs/ext4/ialloc.c | 2 | ||||
-rw-r--r-- | fs/ext4/mmp.c | 2 | ||||
-rw-r--r-- | fs/ext4/super.c | 53 |
6 files changed, 30 insertions, 33 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index dd106b1d5d89..5b342ac67d2e 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c | |||
@@ -47,7 +47,7 @@ static int ext4_journal_check_start(struct super_block *sb) | |||
47 | if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) | 47 | if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) |
48 | return -EIO; | 48 | return -EIO; |
49 | 49 | ||
50 | if (sb->s_flags & MS_RDONLY) | 50 | if (sb_rdonly(sb)) |
51 | return -EROFS; | 51 | return -EROFS; |
52 | WARN_ON(sb->s_writers.frozen == SB_FREEZE_COMPLETE); | 52 | WARN_ON(sb->s_writers.frozen == SB_FREEZE_COMPLETE); |
53 | journal = EXT4_SB(sb)->s_journal; | 53 | journal = EXT4_SB(sb)->s_journal; |
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 57dcaea762c3..da9c6948ad25 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
@@ -371,7 +371,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp) | |||
371 | return -EIO; | 371 | return -EIO; |
372 | 372 | ||
373 | if (unlikely(!(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED) && | 373 | if (unlikely(!(sbi->s_mount_flags & EXT4_MF_MNTDIR_SAMPLED) && |
374 | !(sb->s_flags & MS_RDONLY))) { | 374 | !sb_rdonly(sb))) { |
375 | sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED; | 375 | sbi->s_mount_flags |= EXT4_MF_MNTDIR_SAMPLED; |
376 | /* | 376 | /* |
377 | * Sample where the filesystem has been mounted and | 377 | * Sample where the filesystem has been mounted and |
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index aae2c3971cef..f9230580a84b 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c | |||
@@ -107,7 +107,7 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
107 | 107 | ||
108 | trace_ext4_sync_file_enter(file, datasync); | 108 | trace_ext4_sync_file_enter(file, datasync); |
109 | 109 | ||
110 | if (inode->i_sb->s_flags & MS_RDONLY) { | 110 | if (sb_rdonly(inode->i_sb)) { |
111 | /* Make sure that we read updated s_mount_flags value */ | 111 | /* Make sure that we read updated s_mount_flags value */ |
112 | smp_rmb(); | 112 | smp_rmb(); |
113 | if (EXT4_SB(inode->i_sb)->s_mount_flags & EXT4_MF_FS_ABORTED) | 113 | if (EXT4_SB(inode->i_sb)->s_mount_flags & EXT4_MF_FS_ABORTED) |
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 71e93a23cec3..ee823022aa34 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -1382,7 +1382,7 @@ int ext4_init_inode_table(struct super_block *sb, ext4_group_t group, | |||
1382 | int num, ret = 0, used_blks = 0; | 1382 | int num, ret = 0, used_blks = 0; |
1383 | 1383 | ||
1384 | /* This should not happen, but just to be sure check this */ | 1384 | /* This should not happen, but just to be sure check this */ |
1385 | if (sb->s_flags & MS_RDONLY) { | 1385 | if (sb_rdonly(sb)) { |
1386 | ret = 1; | 1386 | ret = 1; |
1387 | goto out; | 1387 | goto out; |
1388 | } | 1388 | } |
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 77cdce1f17ce..84c54f15f1dd 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c | |||
@@ -185,7 +185,7 @@ static int kmmpd(void *data) | |||
185 | goto exit_thread; | 185 | goto exit_thread; |
186 | } | 186 | } |
187 | 187 | ||
188 | if (sb->s_flags & MS_RDONLY) { | 188 | if (sb_rdonly(sb)) { |
189 | ext4_warning(sb, "kmmpd being stopped since filesystem " | 189 | ext4_warning(sb, "kmmpd being stopped since filesystem " |
190 | "has been remounted as readonly."); | 190 | "has been remounted as readonly."); |
191 | goto exit_thread; | 191 | goto exit_thread; |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 71b9a667e1bc..b104096fce9e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -405,7 +405,7 @@ static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) | |||
405 | 405 | ||
406 | static void ext4_handle_error(struct super_block *sb) | 406 | static void ext4_handle_error(struct super_block *sb) |
407 | { | 407 | { |
408 | if (sb->s_flags & MS_RDONLY) | 408 | if (sb_rdonly(sb)) |
409 | return; | 409 | return; |
410 | 410 | ||
411 | if (!test_opt(sb, ERRORS_CONT)) { | 411 | if (!test_opt(sb, ERRORS_CONT)) { |
@@ -587,8 +587,7 @@ void __ext4_std_error(struct super_block *sb, const char *function, | |||
587 | /* Special case: if the error is EROFS, and we're not already | 587 | /* Special case: if the error is EROFS, and we're not already |
588 | * inside a transaction, then there's really no point in logging | 588 | * inside a transaction, then there's really no point in logging |
589 | * an error. */ | 589 | * an error. */ |
590 | if (errno == -EROFS && journal_current_handle() == NULL && | 590 | if (errno == -EROFS && journal_current_handle() == NULL && sb_rdonly(sb)) |
591 | (sb->s_flags & MS_RDONLY)) | ||
592 | return; | 591 | return; |
593 | 592 | ||
594 | if (ext4_error_ratelimit(sb)) { | 593 | if (ext4_error_ratelimit(sb)) { |
@@ -628,7 +627,7 @@ void __ext4_abort(struct super_block *sb, const char *function, | |||
628 | sb->s_id, function, line, &vaf); | 627 | sb->s_id, function, line, &vaf); |
629 | va_end(args); | 628 | va_end(args); |
630 | 629 | ||
631 | if ((sb->s_flags & MS_RDONLY) == 0) { | 630 | if (sb_rdonly(sb) == 0) { |
632 | ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); | 631 | ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); |
633 | EXT4_SB(sb)->s_mount_flags |= EXT4_MF_FS_ABORTED; | 632 | EXT4_SB(sb)->s_mount_flags |= EXT4_MF_FS_ABORTED; |
634 | /* | 633 | /* |
@@ -889,11 +888,11 @@ static void ext4_put_super(struct super_block *sb) | |||
889 | ext4_mb_release(sb); | 888 | ext4_mb_release(sb); |
890 | ext4_ext_release(sb); | 889 | ext4_ext_release(sb); |
891 | 890 | ||
892 | if (!(sb->s_flags & MS_RDONLY) && !aborted) { | 891 | if (!sb_rdonly(sb) && !aborted) { |
893 | ext4_clear_feature_journal_needs_recovery(sb); | 892 | ext4_clear_feature_journal_needs_recovery(sb); |
894 | es->s_state = cpu_to_le16(sbi->s_mount_state); | 893 | es->s_state = cpu_to_le16(sbi->s_mount_state); |
895 | } | 894 | } |
896 | if (!(sb->s_flags & MS_RDONLY)) | 895 | if (!sb_rdonly(sb)) |
897 | ext4_commit_super(sb, 1); | 896 | ext4_commit_super(sb, 1); |
898 | 897 | ||
899 | for (i = 0; i < sbi->s_gdb_count; i++) | 898 | for (i = 0; i < sbi->s_gdb_count; i++) |
@@ -2100,7 +2099,7 @@ int ext4_seq_options_show(struct seq_file *seq, void *offset) | |||
2100 | struct super_block *sb = seq->private; | 2099 | struct super_block *sb = seq->private; |
2101 | int rc; | 2100 | int rc; |
2102 | 2101 | ||
2103 | seq_puts(seq, (sb->s_flags & MS_RDONLY) ? "ro" : "rw"); | 2102 | seq_puts(seq, sb_rdonly(sb) ? "ro" : "rw"); |
2104 | rc = _ext4_show_options(seq, sb, 1); | 2103 | rc = _ext4_show_options(seq, sb, 1); |
2105 | seq_puts(seq, "\n"); | 2104 | seq_puts(seq, "\n"); |
2106 | return rc; | 2105 | return rc; |
@@ -2368,7 +2367,7 @@ static int ext4_check_descriptors(struct super_block *sb, | |||
2368 | "Checksum for group %u failed (%u!=%u)", | 2367 | "Checksum for group %u failed (%u!=%u)", |
2369 | i, le16_to_cpu(ext4_group_desc_csum(sb, i, | 2368 | i, le16_to_cpu(ext4_group_desc_csum(sb, i, |
2370 | gdp)), le16_to_cpu(gdp->bg_checksum)); | 2369 | gdp)), le16_to_cpu(gdp->bg_checksum)); |
2371 | if (!(sb->s_flags & MS_RDONLY)) { | 2370 | if (!sb_rdonly(sb)) { |
2372 | ext4_unlock_group(sb, i); | 2371 | ext4_unlock_group(sb, i); |
2373 | return 0; | 2372 | return 0; |
2374 | } | 2373 | } |
@@ -3136,8 +3135,7 @@ int ext4_register_li_request(struct super_block *sb, | |||
3136 | goto out; | 3135 | goto out; |
3137 | } | 3136 | } |
3138 | 3137 | ||
3139 | if (first_not_zeroed == ngroups || | 3138 | if (first_not_zeroed == ngroups || sb_rdonly(sb) || |
3140 | (sb->s_flags & MS_RDONLY) || | ||
3141 | !test_opt(sb, INIT_INODE_TABLE)) | 3139 | !test_opt(sb, INIT_INODE_TABLE)) |
3142 | goto out; | 3140 | goto out; |
3143 | 3141 | ||
@@ -3683,7 +3681,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3683 | * previously didn't change the revision level when setting the flags, | 3681 | * previously didn't change the revision level when setting the flags, |
3684 | * so there is a chance incompat flags are set on a rev 0 filesystem. | 3682 | * so there is a chance incompat flags are set on a rev 0 filesystem. |
3685 | */ | 3683 | */ |
3686 | if (!ext4_feature_set_ok(sb, (sb->s_flags & MS_RDONLY))) | 3684 | if (!ext4_feature_set_ok(sb, (sb_rdonly(sb)))) |
3687 | goto failed_mount; | 3685 | goto failed_mount; |
3688 | 3686 | ||
3689 | blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); | 3687 | blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); |
@@ -3812,12 +3810,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3812 | sbi->s_hash_unsigned = 3; | 3810 | sbi->s_hash_unsigned = 3; |
3813 | else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) { | 3811 | else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) { |
3814 | #ifdef __CHAR_UNSIGNED__ | 3812 | #ifdef __CHAR_UNSIGNED__ |
3815 | if (!(sb->s_flags & MS_RDONLY)) | 3813 | if (!sb_rdonly(sb)) |
3816 | es->s_flags |= | 3814 | es->s_flags |= |
3817 | cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH); | 3815 | cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH); |
3818 | sbi->s_hash_unsigned = 3; | 3816 | sbi->s_hash_unsigned = 3; |
3819 | #else | 3817 | #else |
3820 | if (!(sb->s_flags & MS_RDONLY)) | 3818 | if (!sb_rdonly(sb)) |
3821 | es->s_flags |= | 3819 | es->s_flags |= |
3822 | cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); | 3820 | cpu_to_le32(EXT2_FLAGS_SIGNED_HASH); |
3823 | #endif | 3821 | #endif |
@@ -4017,7 +4015,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
4017 | needs_recovery = (es->s_last_orphan != 0 || | 4015 | needs_recovery = (es->s_last_orphan != 0 || |
4018 | ext4_has_feature_journal_needs_recovery(sb)); | 4016 | ext4_has_feature_journal_needs_recovery(sb)); |
4019 | 4017 | ||
4020 | if (ext4_has_feature_mmp(sb) && !(sb->s_flags & MS_RDONLY)) | 4018 | if (ext4_has_feature_mmp(sb) && !sb_rdonly(sb)) |
4021 | if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block))) | 4019 | if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block))) |
4022 | goto failed_mount3a; | 4020 | goto failed_mount3a; |
4023 | 4021 | ||
@@ -4029,7 +4027,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
4029 | err = ext4_load_journal(sb, es, journal_devnum); | 4027 | err = ext4_load_journal(sb, es, journal_devnum); |
4030 | if (err) | 4028 | if (err) |
4031 | goto failed_mount3a; | 4029 | goto failed_mount3a; |
4032 | } else if (test_opt(sb, NOLOAD) && !(sb->s_flags & MS_RDONLY) && | 4030 | } else if (test_opt(sb, NOLOAD) && !sb_rdonly(sb) && |
4033 | ext4_has_feature_journal_needs_recovery(sb)) { | 4031 | ext4_has_feature_journal_needs_recovery(sb)) { |
4034 | ext4_msg(sb, KERN_ERR, "required journal recovery " | 4032 | ext4_msg(sb, KERN_ERR, "required journal recovery " |
4035 | "suppressed and not mounted read-only"); | 4033 | "suppressed and not mounted read-only"); |
@@ -4143,7 +4141,7 @@ no_journal: | |||
4143 | goto failed_mount_wq; | 4141 | goto failed_mount_wq; |
4144 | } | 4142 | } |
4145 | 4143 | ||
4146 | if (DUMMY_ENCRYPTION_ENABLED(sbi) && !(sb->s_flags & MS_RDONLY) && | 4144 | if (DUMMY_ENCRYPTION_ENABLED(sbi) && !sb_rdonly(sb) && |
4147 | !ext4_has_feature_encrypt(sb)) { | 4145 | !ext4_has_feature_encrypt(sb)) { |
4148 | ext4_set_feature_encrypt(sb); | 4146 | ext4_set_feature_encrypt(sb); |
4149 | ext4_commit_super(sb, 1); | 4147 | ext4_commit_super(sb, 1); |
@@ -4197,7 +4195,7 @@ no_journal: | |||
4197 | goto failed_mount4; | 4195 | goto failed_mount4; |
4198 | } | 4196 | } |
4199 | 4197 | ||
4200 | if (ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY)) | 4198 | if (ext4_setup_super(sb, es, sb_rdonly(sb))) |
4201 | sb->s_flags |= MS_RDONLY; | 4199 | sb->s_flags |= MS_RDONLY; |
4202 | 4200 | ||
4203 | /* determine the minimum size of new large inodes, if present */ | 4201 | /* determine the minimum size of new large inodes, if present */ |
@@ -4285,7 +4283,7 @@ no_journal: | |||
4285 | 4283 | ||
4286 | #ifdef CONFIG_QUOTA | 4284 | #ifdef CONFIG_QUOTA |
4287 | /* Enable quota usage during mount. */ | 4285 | /* Enable quota usage during mount. */ |
4288 | if (ext4_has_feature_quota(sb) && !(sb->s_flags & MS_RDONLY)) { | 4286 | if (ext4_has_feature_quota(sb) && !sb_rdonly(sb)) { |
4289 | err = ext4_enable_quotas(sb); | 4287 | err = ext4_enable_quotas(sb); |
4290 | if (err) | 4288 | if (err) |
4291 | goto failed_mount8; | 4289 | goto failed_mount8; |
@@ -4609,7 +4607,7 @@ static int ext4_load_journal(struct super_block *sb, | |||
4609 | * can get read-write access to the device. | 4607 | * can get read-write access to the device. |
4610 | */ | 4608 | */ |
4611 | if (ext4_has_feature_journal_needs_recovery(sb)) { | 4609 | if (ext4_has_feature_journal_needs_recovery(sb)) { |
4612 | if (sb->s_flags & MS_RDONLY) { | 4610 | if (sb_rdonly(sb)) { |
4613 | ext4_msg(sb, KERN_INFO, "INFO: recovery " | 4611 | ext4_msg(sb, KERN_INFO, "INFO: recovery " |
4614 | "required on readonly filesystem"); | 4612 | "required on readonly filesystem"); |
4615 | if (really_read_only) { | 4613 | if (really_read_only) { |
@@ -4764,8 +4762,7 @@ static void ext4_mark_recovery_complete(struct super_block *sb, | |||
4764 | if (jbd2_journal_flush(journal) < 0) | 4762 | if (jbd2_journal_flush(journal) < 0) |
4765 | goto out; | 4763 | goto out; |
4766 | 4764 | ||
4767 | if (ext4_has_feature_journal_needs_recovery(sb) && | 4765 | if (ext4_has_feature_journal_needs_recovery(sb) && sb_rdonly(sb)) { |
4768 | sb->s_flags & MS_RDONLY) { | ||
4769 | ext4_clear_feature_journal_needs_recovery(sb); | 4766 | ext4_clear_feature_journal_needs_recovery(sb); |
4770 | ext4_commit_super(sb, 1); | 4767 | ext4_commit_super(sb, 1); |
4771 | } | 4768 | } |
@@ -4821,7 +4818,7 @@ int ext4_force_commit(struct super_block *sb) | |||
4821 | { | 4818 | { |
4822 | journal_t *journal; | 4819 | journal_t *journal; |
4823 | 4820 | ||
4824 | if (sb->s_flags & MS_RDONLY) | 4821 | if (sb_rdonly(sb)) |
4825 | return 0; | 4822 | return 0; |
4826 | 4823 | ||
4827 | journal = EXT4_SB(sb)->s_journal; | 4824 | journal = EXT4_SB(sb)->s_journal; |
@@ -4886,7 +4883,7 @@ static int ext4_freeze(struct super_block *sb) | |||
4886 | int error = 0; | 4883 | int error = 0; |
4887 | journal_t *journal; | 4884 | journal_t *journal; |
4888 | 4885 | ||
4889 | if (sb->s_flags & MS_RDONLY) | 4886 | if (sb_rdonly(sb)) |
4890 | return 0; | 4887 | return 0; |
4891 | 4888 | ||
4892 | journal = EXT4_SB(sb)->s_journal; | 4889 | journal = EXT4_SB(sb)->s_journal; |
@@ -4921,7 +4918,7 @@ out: | |||
4921 | */ | 4918 | */ |
4922 | static int ext4_unfreeze(struct super_block *sb) | 4919 | static int ext4_unfreeze(struct super_block *sb) |
4923 | { | 4920 | { |
4924 | if ((sb->s_flags & MS_RDONLY) || ext4_forced_shutdown(EXT4_SB(sb))) | 4921 | if (sb_rdonly(sb) || ext4_forced_shutdown(EXT4_SB(sb))) |
4925 | return 0; | 4922 | return 0; |
4926 | 4923 | ||
4927 | if (EXT4_SB(sb)->s_journal) { | 4924 | if (EXT4_SB(sb)->s_journal) { |
@@ -5059,7 +5056,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
5059 | if (*flags & MS_LAZYTIME) | 5056 | if (*flags & MS_LAZYTIME) |
5060 | sb->s_flags |= MS_LAZYTIME; | 5057 | sb->s_flags |= MS_LAZYTIME; |
5061 | 5058 | ||
5062 | if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) { | 5059 | if ((bool)(*flags & MS_RDONLY) != sb_rdonly(sb)) { |
5063 | if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { | 5060 | if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { |
5064 | err = -EROFS; | 5061 | err = -EROFS; |
5065 | goto restore_opts; | 5062 | goto restore_opts; |
@@ -5154,7 +5151,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
5154 | * Reinitialize lazy itable initialization thread based on | 5151 | * Reinitialize lazy itable initialization thread based on |
5155 | * current settings | 5152 | * current settings |
5156 | */ | 5153 | */ |
5157 | if ((sb->s_flags & MS_RDONLY) || !test_opt(sb, INIT_INODE_TABLE)) | 5154 | if (sb_rdonly(sb) || !test_opt(sb, INIT_INODE_TABLE)) |
5158 | ext4_unregister_li_request(sb); | 5155 | ext4_unregister_li_request(sb); |
5159 | else { | 5156 | else { |
5160 | ext4_group_t first_not_zeroed; | 5157 | ext4_group_t first_not_zeroed; |
@@ -5731,7 +5728,7 @@ static inline int ext2_feature_set_ok(struct super_block *sb) | |||
5731 | { | 5728 | { |
5732 | if (ext4_has_unknown_ext2_incompat_features(sb)) | 5729 | if (ext4_has_unknown_ext2_incompat_features(sb)) |
5733 | return 0; | 5730 | return 0; |
5734 | if (sb->s_flags & MS_RDONLY) | 5731 | if (sb_rdonly(sb)) |
5735 | return 1; | 5732 | return 1; |
5736 | if (ext4_has_unknown_ext2_ro_compat_features(sb)) | 5733 | if (ext4_has_unknown_ext2_ro_compat_features(sb)) |
5737 | return 0; | 5734 | return 0; |
@@ -5762,7 +5759,7 @@ static inline int ext3_feature_set_ok(struct super_block *sb) | |||
5762 | return 0; | 5759 | return 0; |
5763 | if (!ext4_has_feature_journal(sb)) | 5760 | if (!ext4_has_feature_journal(sb)) |
5764 | return 0; | 5761 | return 0; |
5765 | if (sb->s_flags & MS_RDONLY) | 5762 | if (sb_rdonly(sb)) |
5766 | return 1; | 5763 | return 1; |
5767 | if (ext4_has_unknown_ext3_ro_compat_features(sb)) | 5764 | if (ext4_has_unknown_ext3_ro_compat_features(sb)) |
5768 | return 0; | 5765 | return 0; |