From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D9C2C47253 for ; Fri, 1 May 2020 13:52:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 162EB205C9 for ; Fri, 1 May 2020 13:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588341163; bh=lvMF2Kf965DlYlL/TYNqQSc35y6WcqH57P/K98qb/3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=giLLOr/gv0jsgsSJtGmZuD949qEeE6acf9cul1YGA6Eewxk81FY0dLYZ2e31yZE8Y +5i/nUIvPJ7cHiAY9Kyoo+V8dGsc89pk+GUJHTGvmEx4BzgIaEPubHj0SbemE+2MvQ 2eGRdpCDS18F3HxFfX2SEBzxV3Q6cNobAfsRi/N4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730277AbgEANwm (ORCPT ); Fri, 1 May 2020 09:52:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:36502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730563AbgEANh1 (ORCPT ); Fri, 1 May 2020 09:37:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BC6AB24954; Fri, 1 May 2020 13:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588340247; bh=lvMF2Kf965DlYlL/TYNqQSc35y6WcqH57P/K98qb/3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZmKEpx3p6VBNEPkzKmDpp/L/5RNIVRAh2HXXnbXUoGhC77F6sp6O4MVgtMIhrbZWx JJseT6jlih41Ga3Y5ea1+8w+if7RIXqMU23aZg2+Zmie2KEBAHaJt66KDeJaqnyqeY RUuVbFTUZAkk5YkqtsuLjEWBeI5qx4tC3LVPphE4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, yangerkun , Theodore Tso , Ritesh Harjani , Jan Kara , Sasha Levin Subject: [PATCH 4.19 40/46] ext4: use matching invalidatepage in ext4_writepage Date: Fri, 1 May 2020 15:23:05 +0200 Message-Id: <20200501131512.697455486@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200501131457.023036302@linuxfoundation.org> References: <20200501131457.023036302@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: yangerkun [ Upstream commit c2a559bc0e7ed5a715ad6b947025b33cb7c05ea7 ] Run generic/388 with journal data mode sometimes may trigger the warning in ext4_invalidatepage. Actually, we should use the matching invalidatepage in ext4_writepage. Signed-off-by: yangerkun Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200226041002.13914-1-yangerkun@huawei.com Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 000fa0e392787..3b1a7597af15e 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2128,7 +2128,7 @@ static int ext4_writepage(struct page *page, bool keep_towrite = false; if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) { - ext4_invalidatepage(page, 0, PAGE_SIZE); + inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE); unlock_page(page); return -EIO; } -- 2.20.1