From patchwork Fri May 1 13:22:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 226534 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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 B3380C47258 for ; Fri, 1 May 2020 13:54:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8920820757 for ; Fri, 1 May 2020 13:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588341251; bh=9ZEfTlPJ7HVJU0ny0FcJ9LkkLSG0DsPnQSqKHUzEQVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=h6D2r3P15Dav6jYc0EzUbWPu+UBhuGbaEXqt2XfUVxwMJJXgl0Dvgt9hVNRg93xCP UM5hT8G2W22JNX/vOymNe5QiyH7EMHAEKIJ+1ZXCSZOAQCFJC+fYVmKd5YoTIdIpNF 50K7CYBdC8V7BnG61kmf45GZ9MVubp2U367rSRK4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730728AbgEANfh (ORCPT ); Fri, 1 May 2020 09:35:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:33812 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730712AbgEANfc (ORCPT ); Fri, 1 May 2020 09:35:32 -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 20E5E216FD; Fri, 1 May 2020 13:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588340131; bh=9ZEfTlPJ7HVJU0ny0FcJ9LkkLSG0DsPnQSqKHUzEQVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SAsEAFaX7X4OkzIxNZu7wEPkYeFOAgSx6ulCJe42hWfZ3E3EaJRgRSLhpeWcFw8BU tCIOuQT3RGccr6bP4N/5Pc17wnWiRhpidLXoLg8BmCr9S9r39Ykf8WtBYLkEQvx3LS AhxLrZvPs+optbOGnZiUpkQXxCM5pminUi7On3oQ= 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.14 106/117] ext4: use matching invalidatepage in ext4_writepage Date: Fri, 1 May 2020 15:22:22 +0200 Message-Id: <20200501131557.944505287@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200501131544.291247695@linuxfoundation.org> References: <20200501131544.291247695@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 5b0d5ca2c2b2a..0cbb241488ec3 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2123,7 +2123,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; }