diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 486a641ca71b..c63a18b574dd 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1518,10 +1518,14 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
1518 | set_opt(sbi->s_mount_opt, GRPID); | 1518 | set_opt(sbi->s_mount_opt, GRPID); |
1519 | if (def_mount_opts & EXT4_DEFM_UID16) | 1519 | if (def_mount_opts & EXT4_DEFM_UID16) |
1520 | set_opt(sbi->s_mount_opt, NO_UID32); | 1520 | set_opt(sbi->s_mount_opt, NO_UID32); |
1521 | #ifdef CONFIG_EXT4DEV_FS_XATTR | ||
1521 | if (def_mount_opts & EXT4_DEFM_XATTR_USER) | 1522 | if (def_mount_opts & EXT4_DEFM_XATTR_USER) |
1522 | set_opt(sbi->s_mount_opt, XATTR_USER); | 1523 | set_opt(sbi->s_mount_opt, XATTR_USER); |
1524 | #endif | ||
1525 | #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | ||
1523 | if (def_mount_opts & EXT4_DEFM_ACL) | 1526 | if (def_mount_opts & EXT4_DEFM_ACL) |
1524 | set_opt(sbi->s_mount_opt, POSIX_ACL); | 1527 | set_opt(sbi->s_mount_opt, POSIX_ACL); |
1528 | #endif | ||
1525 | if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA) | 1529 | if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA) |
1526 | sbi->s_mount_opt |= EXT4_MOUNT_JOURNAL_DATA; | 1530 | sbi->s_mount_opt |= EXT4_MOUNT_JOURNAL_DATA; |
1527 | else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED) | 1531 | else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED) |
@@ -2419,6 +2423,22 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data) | |||
2419 | err = -EROFS; | 2423 | err = -EROFS; |
2420 | goto restore_opts; | 2424 | goto restore_opts; |
2421 | } | 2425 | } |
2426 | |||
2427 | /* | ||
2428 | * If we have an unprocessed orphan list hanging | ||
2429 | * around from a previously readonly bdev mount, | ||
2430 | * require a full umount/remount for now. | ||
2431 | */ | ||
2432 | if (es->s_last_orphan) { | ||
2433 | printk(KERN_WARNING "EXT4-fs: %s: couldn't " | ||
2434 | "remount RDWR because of unprocessed " | ||
2435 | "orphan inode list. Please " | ||
2436 | "umount/remount instead.\n", | ||
2437 | sb->s_id); | ||
2438 | err = -EINVAL; | ||
2439 | goto restore_opts; | ||
2440 | } | ||
2441 | |||
2422 | /* | 2442 | /* |
2423 | * Mounting a RDONLY partition read-write, so reread | 2443 | * Mounting a RDONLY partition read-write, so reread |
2424 | * and store the current valid flag. (It may have | 2444 | * and store the current valid flag. (It may have |