From nobody Thu Apr 2 17:39:50 2026 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [160.30.148.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C87E224AF2 for ; Wed, 11 Feb 2026 14:15:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=160.30.148.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770819337; cv=none; b=GEwHddNqwCZVz7HGFYrBrKSHVsgA5yuQ4U3Gfwo4V8Ghhyd8HXJXkRRJfoznapmpi/3KVAjnu0m62DloHQnauI90qlGi2XXDMgHXNGRPiQGK57cmdp03y0AL6R64k9+NxB59MZuAr989RoZZM+Pq0drtwGmjR5RukWjQVNijKtw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770819337; c=relaxed/simple; bh=oAAGV8aj/FmI88Or028RPLk7jSiMVbYxbm17drvVXmc=; h=Message-ID:Date:Mime-Version:From:To:Cc:Subject:Content-Type; b=dJYXQw4YpExqjCcFu8LBtykW9OuCOA9BUQyX8SEriGMlYYTCOEdYIc5L12m9R6hLCiKIGr0eA2/54B3PS4cYJx4pt05yD222R92VC20iIl3YxRA44oEpwnw8iBCp43U49Jaa64ZnKEx+IFlyr/+tZLEdr/DF5IjbdkqoIGIURuQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=160.30.148.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4fB0nw1DTKz5B13Y; Wed, 11 Feb 2026 22:15:32 +0800 (CST) Received: from xaxapp05.zte.com.cn ([10.99.98.109]) by mse-fl2.zte.com.cn with SMTP id 61BEFQVq009838; Wed, 11 Feb 2026 22:15:26 +0800 (+08) (envelope-from fan.yu9@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid32; Wed, 11 Feb 2026 22:15:29 +0800 (CST) X-Zmail-TransId: 2af9698c8f01f01-ae3b8 X-Mailer: Zmail v1.0 Message-ID: <20260211221529715WQDbX2CWifJrBOSLR_8XF@zte.com.cn> Date: Wed, 11 Feb 2026 22:15:29 +0800 (CST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , Cc: , , , , , , , Subject: =?UTF-8?B?W1BBVENIIHYyXSB1YmlmczogcHJldmVudCBjb3JydXB0ZWQgZGF0YSB3cml0ZSB2aWEgZXJyb3JfcmVtb3ZlX2ZvbGlvwqA=?= X-MAIL: mse-fl2.zte.com.cn 61BEFQVq009838 X-TLS: YES X-SPF-DOMAIN: zte.com.cn X-ENVELOPE-SENDER: fan.yu9@zte.com.cn X-SPF: None X-SOURCE-IP: 10.5.228.133 unknown Wed, 11 Feb 2026 22:15:32 +0800 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 698C8F04.000/4fB0nw1DTKz5B13Y Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jinpeng Cui When a memory corruption event triggers memory_failure, ext4 releases references to the affected dirty pages, ensuring that no corrupted data is written to disk. However, ubifs currently lacks the error_remove_folio capabilityand therefore cannot release references to faulty private memory. As a result, corrupted data may eventually be written to flash storage. Add generic_error_remove_folio support to ubifs, preventing corrupted memory data from being persisted to flash. Signed-off-by: Jinpeng Cui Signed-off-by: Shengming Hu Signed-off-by: Fan Yu Reviewed-by: Zhihao Cheng Reviewed-by: xu xin --- Changes in v2: - Some format fixes according to https://lore.kernel.org/all/20260211173233604W9pVxv17lV3V2uYD3zCOq@zte.com.= cn/ fs/ubifs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index ca41ce8208c4..730318eb1ba8 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1635,6 +1635,7 @@ const struct address_space_operations ubifs_file_addr= ess_operations =3D { .dirty_folio =3D ubifs_dirty_folio, .migrate_folio =3D filemap_migrate_folio, .release_folio =3D ubifs_release_folio, + .error_remove_folio =3D generic_error_remove_folio, }; const struct inode_operations ubifs_file_inode_operations =3D { --=20 2.25.1