diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 39f00f05f981..84f309907d58 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6638,6 +6638,17 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb) return 0; restore_opts: + ext4_warning(sb, "remount failed! was %s attempted %s", + (old_sb_flags & SB_RDONLY) ? "ro" : "rw", + (sb->s_flags & SB_RDONLY) ? "ro" : "rw"); + if ((sb->s_flags & SB_RDONLY) && + !(old_sb_flags & SB_RDONLY)) { + ext4_warning(sb, "failing rw->ro transition"); + if (sb_any_quota_suspended(sb)) { + ext4_warning(sb, "would resume quotas"); +// dquot_resume(sb, -1); + } + } sb->s_flags = old_sb_flags; sbi->s_mount_opt = old_opts.s_mount_opt; sbi->s_mount_opt2 = old_opts.s_mount_opt2; @@ -6678,8 +6689,8 @@ static int ext4_reconfigure(struct fs_context *fc) if (ret < 0) return ret; - ext4_msg(sb, KERN_INFO, "re-mounted %pU. Quota mode: %s.", - &sb->s_uuid, ext4_quota_mode(sb)); + ext4_msg(sb, KERN_INFO, "re-mounted %pU %s. Quota mode: %s.", + &sb->s_uuid, sb_rdonly(sb) ? "ro" : "rw", ext4_quota_mode(sb)); return 0; }