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.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 2AC62C433DF for ; Fri, 15 May 2020 13:17:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA21D20709 for ; Fri, 15 May 2020 13:17:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Ouac5fKO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbgEONRY (ORCPT ); Fri, 15 May 2020 09:17:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726624AbgEONRE (ORCPT ); Fri, 15 May 2020 09:17:04 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05727C05BD1F; Fri, 15 May 2020 06:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=EpnkLjZqk1S3DSmVdcLM12MdJ2sgIE4S7yU2k8eu7Iw=; b=Ouac5fKOcAvAmnZMVvgIPIulHz DBYXu8tRuuU2a1+ObC+C8BwL0TvJlGyVB2yuMmX+Yt5T2jW2NDuiC1XnYHtaW2rmMH15oyeWPkVDd uWHxTwHy06J+v1q+Z7YcZmhjqG+5wkRycaYFO6Td47uoQiauEsfZWpQJH/MOutPZmGXJt7AW20Nfq NZU/AQg9di4fKaqnG3jm/1CZ4gb0IFH/WgWCC2yb1Aw8MlUVSooBh2QbM+UrqLwZ2kGNSKXsN0qO1 F/QddNe1SrlYeEjhcgOYx2ZIpQmezI0VcBi2wn45FMUyqdG8I6/gQwedLDAzNeQUhpUCoCbspc1Tb slpHaFWA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZaD0-0005nF-Jh; Fri, 15 May 2020 13:17:02 +0000 From: Matthew Wilcox To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 30/36] mm: Support tail pages in wait_for_stable_page Date: Fri, 15 May 2020 06:16:50 -0700 Message-Id: <20200515131656.12890-31-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200515131656.12890-1-willy@infradead.org> References: <20200515131656.12890-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org From: "Matthew Wilcox (Oracle)" page->mapping is undefined for tail pages, so operate exclusively on the head page. Signed-off-by: Matthew Wilcox (Oracle) --- mm/page-writeback.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 7326b54ab728..e2da7d7e93b8 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2841,6 +2841,7 @@ EXPORT_SYMBOL_GPL(wait_on_page_writeback); */ void wait_for_stable_page(struct page *page) { + page = compound_head(page); if (bdi_cap_stable_pages_required(inode_to_bdi(page->mapping->host))) wait_on_page_writeback(page); } -- 2.26.2