aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-06-13 10:09:36 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-06-13 10:09:36 -0400
commit4ab2f15b7f709c3626a7eed075a7225b4c775c7e (patch)
treebfefc592c4c2eb176162134c615132e75f810486 /fs/ext4/super.c
parentbc0b0d6d69ee9022f18ae264e62beb30ddeb322a (diff)
ext4: move the abort flag from s_mount_opts to s_mount_flags
We're running out of space in the mount options word, and EXT4_MOUNT_ABORT isn't really a mount option, but a run-time flag. So move it to become EXT4_MF_FS_ABORTED in s_mount_flags. Also remove bogus ext2_fs.h / ext4.h simultaneous #include protection, which can never happen. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4c364ae7aeb1..04486a53469f 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -303,7 +303,7 @@ static void ext4_handle_error(struct super_block *sb)
303 if (!test_opt(sb, ERRORS_CONT)) { 303 if (!test_opt(sb, ERRORS_CONT)) {
304 journal_t *journal = EXT4_SB(sb)->s_journal; 304 journal_t *journal = EXT4_SB(sb)->s_journal;
305 305
306 EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; 306 EXT4_SB(sb)->s_mount_flags |= EXT4_MF_FS_ABORTED;
307 if (journal) 307 if (journal)
308 jbd2_journal_abort(journal, -EIO); 308 jbd2_journal_abort(journal, -EIO);
309 } 309 }
@@ -416,7 +416,7 @@ void ext4_abort(struct super_block *sb, const char *function,
416 ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only"); 416 ext4_msg(sb, KERN_CRIT, "Remounting filesystem read-only");
417 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; 417 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
418 sb->s_flags |= MS_RDONLY; 418 sb->s_flags |= MS_RDONLY;
419 EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; 419 EXT4_SB(sb)->s_mount_flags |= EXT4_MF_FS_ABORTED;
420 if (EXT4_SB(sb)->s_journal) 420 if (EXT4_SB(sb)->s_journal)
421 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); 421 jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO);
422} 422}
@@ -1476,7 +1476,7 @@ set_qf_format:
1476 break; 1476 break;
1477#endif 1477#endif
1478 case Opt_abort: 1478 case Opt_abort:
1479 set_opt(sbi->s_mount_opt, ABORT); 1479 sbi->s_mount_flags |= EXT4_MF_FS_ABORTED;
1480 break; 1480 break;
1481 case Opt_nobarrier: 1481 case Opt_nobarrier:
1482 clear_opt(sbi->s_mount_opt, BARRIER); 1482 clear_opt(sbi->s_mount_opt, BARRIER);
@@ -3452,7 +3452,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
3452 goto restore_opts; 3452 goto restore_opts;
3453 } 3453 }
3454 3454
3455 if (sbi->s_mount_opt & EXT4_MOUNT_ABORT) 3455 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
3456 ext4_abort(sb, __func__, "Abort forced by user"); 3456 ext4_abort(sb, __func__, "Abort forced by user");
3457 3457
3458 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 3458 sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
@@ -3467,7 +3467,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
3467 3467
3468 if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) || 3468 if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY) ||
3469 n_blocks_count > ext4_blocks_count(es)) { 3469 n_blocks_count > ext4_blocks_count(es)) {
3470 if (sbi->s_mount_opt & EXT4_MOUNT_ABORT) { 3470 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
3471 err = -EROFS; 3471 err = -EROFS;
3472 goto restore_opts; 3472 goto restore_opts;
3473 } 3473 }