From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x226mL+RrP9GyISTt01imMOXgcLtztlY3gORRHotsVkpGaUUCRGYyPBWZC1xpyK2qNRUaBKwz ARC-Seal: i=1; a=rsa-sha256; t=1519218205; cv=none; d=google.com; s=arc-20160816; b=jk7g1FMRjwGwmiRLoyAdDQJFhAOy9quevKwBjd+fgUdaqeAknv84TKO1VQxqWibW/V v8yIXWsBfPs1Ry9FKaEsRIKYLMEIHE1Jxy/Yc9xcHe48mX9qRj7NZxinCQQNCgxvUP3s 9eGQ3IghDsV9zGhbIZvxeSfygUBvjliT17VVaJYRqNX4KjPwyo8zt0sV5ScmfAx1bPVj CtJgZkcsSJDNffGmBMJn3jaq7lfoMaRaQAKD/0WG6eVgdzO6cuTwmsv0MTIGy1G/rTvs y0/Xy6eUkpfgBqMQ1+AKGFx1exO5OLEm37MYRxfMmavtzKB4uCW6886jo/4aEhU9XPmc DVZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=ehdTZ9tMCzT29CfFvg6WTUfaLoaThhRTBn3tlzfiowg=; b=iLjsY5whPuuc/cbbaJJ3eVuzSd674jq9aBd/UrscIk2+PobkZ+ryGoLwQ1Xzbs1F97 /9OQ/3glaHrUOq3UKaySx8KYpcN1L042QvgPqjkpMOOFCmYaee6tsJciKDeGRgl5nQnP JXRgBRjfQuXUWWEm18sWNQ+SAQHLCHWRuVb6CRVIcZ9JEGHwjIAAWasrEHJB7pgriXaw YuRg3XKcgmrofT2d0MWC4SjHiLB3q6NZwm31BmcbKFxK9T/5aKkpvuHoketb7ZaES1Sq fUiRW4u9jjxpWukBddRYeQfdfhBMdiljZpbF0/Hvis5hwwC6HSsuGp5wCmPIHQxH33+a Y9hA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhouyi Zhou , Theodore Tso Subject: [PATCH 4.14 107/167] ext4: save error to disk in __ext4_grp_locked_error() Date: Wed, 21 Feb 2018 13:48:38 +0100 Message-Id: <20180221124530.228653898@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124524.639039577@linuxfoundation.org> References: <20180221124524.639039577@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1593014620343797175?= X-GMAIL-MSGID: =?utf-8?q?1593015749281149445?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhouyi Zhou commit 06f29cc81f0350261f59643a505010531130eea0 upstream. In the function __ext4_grp_locked_error(), __save_error_info() is called to save error info in super block block, but does not sync that information to disk to info the subsequence fsck after reboot. This patch writes the error information to disk. After this patch, I think there is no obvious EXT4 error handle branches which leads to "Remounting filesystem read-only" will leave the disk partition miss the subsequence fsck. Signed-off-by: Zhouyi Zhou Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -742,6 +742,7 @@ __acquires(bitlock) } ext4_unlock_group(sb, grp); + ext4_commit_super(sb, 1); ext4_handle_error(sb); /* * We only get here in the ERRORS_RO case; relocking the group