Unverified Commit df4c334b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13961 ext4: avoid remount errors with 'abort' mount option

parents 510b4e28 c3c1716d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -6662,9 +6662,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
		goto restore_opts;
	}

	if (test_opt2(sb, ABORT))
		ext4_abort(sb, ESHUTDOWN, "Abort forced by user");

	sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
		(test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);

@@ -6833,6 +6830,14 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
	if (!ext4_has_feature_mmp(sb) || sb_rdonly(sb))
		ext4_stop_mmpd(sbi);

	/*
	 * Handle aborting the filesystem as the last thing during remount to
	 * avoid obsure errors during remount when some option changes fail to
	 * apply due to shutdown filesystem.
	 */
	if (test_opt2(sb, ABORT))
		ext4_abort(sb, ESHUTDOWN, "Abort forced by user");

	return 0;

restore_opts: