aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0556cd036b69..7c46693a14d7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -422,7 +422,7 @@ static void ext4_handle_error(struct super_block *sb)
422 * before ->s_flags update 422 * before ->s_flags update
423 */ 423 */
424 smp_wmb(); 424 smp_wmb();
425 sb->s_flags |= MS_RDONLY; 425 sb->s_flags |= SB_RDONLY;
426 } 426 }
427 if (test_opt(sb, ERRORS_PANIC)) { 427 if (test_opt(sb, ERRORS_PANIC)) {
428 if (EXT4_SB(sb)->s_journal && 428 if (EXT4_SB(sb)->s_journal &&
@@ -635,7 +635,7 @@ void __ext4_abort(struct super_block *sb, const char *function,
635 * before ->s_flags update 635 * before ->s_flags update
636 */ 636 */
637 smp_wmb(); 637 smp_wmb();
638 sb->s_flags |= MS_RDONLY; 638 sb->s_flags |= SB_RDONLY;
639 if (EXT4_SB(sb)->s_journal) 639 if (EXT4_SB(sb)->s_journal)
640 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); 640 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO);
641 save_error_info(sb, function, line); 641 save_error_info(sb, function, line);
@@ -1682,10 +1682,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
1682 sb->s_flags |= SB_I_VERSION; 1682 sb->s_flags |= SB_I_VERSION;
1683 return 1; 1683 return 1;
1684 case Opt_lazytime: 1684 case Opt_lazytime:
1685 sb->s_flags |= MS_LAZYTIME; 1685 sb->s_flags |= SB_LAZYTIME;
1686 return 1; 1686 return 1;
1687 case Opt_nolazytime: 1687 case Opt_nolazytime:
1688 sb->s_flags &= ~MS_LAZYTIME; 1688 sb->s_flags &= ~SB_LAZYTIME;
1689 return 1; 1689 return 1;
1690 } 1690 }
1691 1691
@@ -2116,7 +2116,7 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
2116 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { 2116 if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) {
2117 ext4_msg(sb, KERN_ERR, "revision level too high, " 2117 ext4_msg(sb, KERN_ERR, "revision level too high, "
2118 "forcing read-only mode"); 2118 "forcing read-only mode");
2119 res = MS_RDONLY; 2119 res = SB_RDONLY;
2120 } 2120 }
2121 if (read_only) 2121 if (read_only)
2122 goto done; 2122 goto done;
@@ -2429,7 +2429,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2429 2429
2430 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { 2430 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
2431 /* don't clear list on RO mount w/ errors */ 2431 /* don't clear list on RO mount w/ errors */
2432 if (es->s_last_orphan && !(s_flags & MS_RDONLY)) { 2432 if (es->s_last_orphan && !(s_flags & SB_RDONLY)) {
2433 ext4_msg(sb, KERN_INFO, "Errors on filesystem, " 2433 ext4_msg(sb, KERN_INFO, "Errors on filesystem, "
2434 "clearing orphan list.\n"); 2434 "clearing orphan list.\n");
2435 es->s_last_orphan = 0; 2435 es->s_last_orphan = 0;
@@ -2438,19 +2438,19 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2438 return; 2438 return;
2439 } 2439 }
2440 2440
2441 if (s_flags & MS_RDONLY) { 2441 if (s_flags & SB_RDONLY) {
2442 ext4_msg(sb, KERN_INFO, "orphan cleanup on readonly fs"); 2442 ext4_msg(sb, KERN_INFO, "orphan cleanup on readonly fs");
2443 sb->s_flags &= ~MS_RDONLY; 2443 sb->s_flags &= ~SB_RDONLY;
2444 } 2444 }
2445#ifdef CONFIG_QUOTA 2445#ifdef CONFIG_QUOTA
2446 /* Needed for iput() to work correctly and not trash data */ 2446 /* Needed for iput() to work correctly and not trash data */
2447 sb->s_flags |= MS_ACTIVE; 2447 sb->s_flags |= SB_ACTIVE;
2448 2448
2449 /* 2449 /*
2450 * Turn on quotas which were not enabled for read-only mounts if 2450 * Turn on quotas which were not enabled for read-only mounts if
2451 * filesystem has quota feature, so that they are updated correctly. 2451 * filesystem has quota feature, so that they are updated correctly.
2452 */ 2452 */
2453 if (ext4_has_feature_quota(sb) && (s_flags & MS_RDONLY)) { 2453 if (ext4_has_feature_quota(sb) && (s_flags & SB_RDONLY)) {
2454 int ret = ext4_enable_quotas(sb); 2454 int ret = ext4_enable_quotas(sb);
2455 2455
2456 if (!ret) 2456 if (!ret)
@@ -2539,7 +2539,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2539 } 2539 }
2540 } 2540 }
2541#endif 2541#endif
2542 sb->s_flags = s_flags; /* Restore MS_RDONLY status */ 2542 sb->s_flags = s_flags; /* Restore SB_RDONLY status */
2543} 2543}
2544 2544
2545/* 2545/*
@@ -2741,7 +2741,7 @@ static int ext4_feature_set_ok(struct super_block *sb, int readonly)
2741 2741
2742 if (ext4_has_feature_readonly(sb)) { 2742 if (ext4_has_feature_readonly(sb)) {
2743 ext4_msg(sb, KERN_INFO, "filesystem is read-only"); 2743 ext4_msg(sb, KERN_INFO, "filesystem is read-only");
2744 sb->s_flags |= MS_RDONLY; 2744 sb->s_flags |= SB_RDONLY;
2745 return 1; 2745 return 1;
2746 } 2746 }
2747 2747
@@ -3623,8 +3623,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
3623 sb->s_iflags |= SB_I_CGROUPWB; 3623 sb->s_iflags |= SB_I_CGROUPWB;
3624 } 3624 }
3625 3625
3626 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 3626 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
3627 (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 3627 (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
3628 3628
3629 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV && 3629 if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV &&
3630 (ext4_has_compat_features(sb) || 3630 (ext4_has_compat_features(sb) ||
@@ -4199,7 +4199,7 @@ no_journal:
4199 } 4199 }
4200 4200
4201 if (ext4_setup_super(sb, es, sb_rdonly(sb))) 4201 if (ext4_setup_super(sb, es, sb_rdonly(sb)))
4202 sb->s_flags |= MS_RDONLY; 4202 sb->s_flags |= SB_RDONLY;
4203 4203
4204 /* determine the minimum size of new large inodes, if present */ 4204 /* determine the minimum size of new large inodes, if present */
4205 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE && 4205 if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE &&
@@ -4693,7 +4693,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
4693 * the clock is set in the future, and this will cause e2fsck 4693 * the clock is set in the future, and this will cause e2fsck
4694 * to complain and force a full file system check. 4694 * to complain and force a full file system check.
4695 */ 4695 */
4696 if (!(sb->s_flags & MS_RDONLY)) 4696 if (!(sb->s_flags & SB_RDONLY))
4697 es->s_wtime = cpu_to_le32(get_seconds()); 4697 es->s_wtime = cpu_to_le32(get_seconds());
4698 if (sb->s_bdev->bd_part) 4698 if (sb->s_bdev->bd_part)
4699 es->s_kbytes_written = 4699 es->s_kbytes_written =
@@ -5047,8 +5047,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5047 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) 5047 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
5048 ext4_abort(sb, "Abort forced by user"); 5048 ext4_abort(sb, "Abort forced by user");
5049 5049
5050 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 5050 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
5051 (test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0); 5051 (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
5052 5052
5053 es = sbi->s_es; 5053 es = sbi->s_es;
5054 5054
@@ -5057,16 +5057,16 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5057 set_task_ioprio(sbi->s_journal->j_task, journal_ioprio); 5057 set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
5058 } 5058 }
5059 5059
5060 if (*flags & MS_LAZYTIME) 5060 if (*flags & SB_LAZYTIME)
5061 sb->s_flags |= MS_LAZYTIME; 5061 sb->s_flags |= SB_LAZYTIME;
5062 5062
5063 if ((bool)(*flags & MS_RDONLY) != sb_rdonly(sb)) { 5063 if ((bool)(*flags & SB_RDONLY) != sb_rdonly(sb)) {
5064 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) { 5064 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
5065 err = -EROFS; 5065 err = -EROFS;
5066 goto restore_opts; 5066 goto restore_opts;
5067 } 5067 }
5068 5068
5069 if (*flags & MS_RDONLY) { 5069 if (*flags & SB_RDONLY) {
5070 err = sync_filesystem(sb); 5070 err = sync_filesystem(sb);
5071 if (err < 0) 5071 if (err < 0)
5072 goto restore_opts; 5072 goto restore_opts;
@@ -5078,7 +5078,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5078 * First of all, the unconditional stuff we have to do 5078 * First of all, the unconditional stuff we have to do
5079 * to disable replay of the journal when we next remount 5079 * to disable replay of the journal when we next remount
5080 */ 5080 */
5081 sb->s_flags |= MS_RDONLY; 5081 sb->s_flags |= SB_RDONLY;
5082 5082
5083 /* 5083 /*
5084 * OK, test if we are remounting a valid rw partition 5084 * OK, test if we are remounting a valid rw partition
@@ -5140,7 +5140,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5140 ext4_clear_journal_err(sb, es); 5140 ext4_clear_journal_err(sb, es);
5141 sbi->s_mount_state = le16_to_cpu(es->s_state); 5141 sbi->s_mount_state = le16_to_cpu(es->s_state);
5142 if (!ext4_setup_super(sb, es, 0)) 5142 if (!ext4_setup_super(sb, es, 0))
5143 sb->s_flags &= ~MS_RDONLY; 5143 sb->s_flags &= ~SB_RDONLY;
5144 if (ext4_has_feature_mmp(sb)) 5144 if (ext4_has_feature_mmp(sb))
5145 if (ext4_multi_mount_protect(sb, 5145 if (ext4_multi_mount_protect(sb,
5146 le64_to_cpu(es->s_mmp_block))) { 5146 le64_to_cpu(es->s_mmp_block))) {
@@ -5164,7 +5164,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5164 } 5164 }
5165 5165
5166 ext4_setup_system_zone(sb); 5166 ext4_setup_system_zone(sb);
5167 if (sbi->s_journal == NULL && !(old_sb_flags & MS_RDONLY)) 5167 if (sbi->s_journal == NULL && !(old_sb_flags & SB_RDONLY))
5168 ext4_commit_super(sb, 1); 5168 ext4_commit_super(sb, 1);
5169 5169
5170#ifdef CONFIG_QUOTA 5170#ifdef CONFIG_QUOTA
@@ -5182,7 +5182,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
5182 } 5182 }
5183#endif 5183#endif
5184 5184
5185 *flags = (*flags & ~MS_LAZYTIME) | (sb->s_flags & MS_LAZYTIME); 5185 *flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME);
5186 ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data); 5186 ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data);
5187 kfree(orig_data); 5187 kfree(orig_data);
5188 return 0; 5188 return 0;