Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1726845pxb; Thu, 4 Mar 2021 20:27:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEqh0nu0ttCqU7Id80T5j+nvoM4xKKhxVrxGKaMnbRYPQt1H9VW0zgC3bdhNYFfbmaLXTh X-Received: by 2002:a05:6e02:1a49:: with SMTP id u9mr6975082ilv.140.1614918461434; Thu, 04 Mar 2021 20:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614918461; cv=none; d=google.com; s=arc-20160816; b=osD0kLqiTIG6nFap2psBJzLj4OFxakPKubg7m1Ix0RIW45zTmE+N0KDJeIF7Zx4A31 8lKY2eQIpCqrijFVRA/sfzDwmrMUEvk0ymsaw0URcaCiuyGlO47XFNCIcwl7KsgRPBa5 wR+dvHLJzZ1BQW1AhBIPLHiw0JoILnigZ8Gk1XI3Kjf0qNto++VjgiCAdJVzEVfwZ/fn Vn2Xw1mS3q6rIJzYrV5/1LyOFSoeHv+wr+Ofyl+wrd3BXQbyHphXEPwY7q13ZKyb1cpu iwr37OORkipaY6dXVUDI7WYveYpIZw/fGP0GTQt4M6RiBbJJuR0lY2bmkW1wQ1DObHQK 8d0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2mVG/6NaJ0p9YqrQ1jNJsnSFUsHzgfQvDIqsB+egAHI=; b=J4JnBSqh4og4cyFse3ATBcwGxU0I17fTRm8vvK6/3VHNYOgP62bfKSyHmJlvC05eUf 33LeteJSdaMwj0y70PUqd8xZu5WRqG2sc64i7ZmuC1Pe+Ll+nVXE+TGzvGPzt1VbiTEx 9qQpU5hmUmlxisfO+CFKwAamZ7TZT30cudbkzDZrd28S5kii+ELdn6TqBdY0h9DP9tUO wZTFW9qY8PpoS8TrYFXcoJWB17awkTgvj2hCyO4Gu0hcf4V9t67/apAtXaguEP1wWS2J m3985Af35WtPzY8jvXqOpt/WuIgohsME1kEMxlRssmR40PAMt+d0qGG6/IkQg2/d7zRM KWzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fiXsBiNy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si1508269jan.13.2021.03.04.20.27.28; Thu, 04 Mar 2021 20:27:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fiXsBiNy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbhCEE05 (ORCPT + 99 others); Thu, 4 Mar 2021 23:26:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbhCEE04 (ORCPT ); Thu, 4 Mar 2021 23:26:56 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8F73C061574; Thu, 4 Mar 2021 20:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=2mVG/6NaJ0p9YqrQ1jNJsnSFUsHzgfQvDIqsB+egAHI=; b=fiXsBiNyHiOVlScQGgeMMy82Ta RfKmP56pRubGGDoiLekMcYD2drcJzcft74CU8+sM1/RKbz4Nr6YzmeXqXLcoRHInLIbnYGHWlz68e mfv7ctNvSk+eI5ausnbEv6gqDGtG2NwQ1yfNJPF1Qi5yLtgV6GBDnZl9tohTbLJ94fMt5mWz6MPgQ Nc2bfdVG+mzIDh70LVy2wJbnKRM4goVWHF7ZJ/aeUXp6BSQQPR7UXkTlvPWjL6Ad6P9gABuRnO439 DaTZCLmfiJ0959ZU7QjLKyC+zT/Kr2MlEh2m9Ohs67rbyJIZpIOZUzv9/j0Llxa8+kA5XW25L/ChB xcWTFrcg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lI22e-00A4jU-Sh; Fri, 05 Mar 2021 04:26:27 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v4 22/25] mm/filemap: Convert wake_up_page_bit to wake_up_folio_bit Date: Fri, 5 Mar 2021 04:18:58 +0000 Message-Id: <20210305041901.2396498-23-willy@infradead.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210305041901.2396498-1-willy@infradead.org> References: <20210305041901.2396498-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All callers have a folio, so use it directly. Signed-off-by: Matthew Wilcox (Oracle) --- mm/filemap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 76c97cb9cbbe..e91fa14c86c7 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1094,14 +1094,14 @@ static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync, return (flags & WQ_FLAG_EXCLUSIVE) != 0; } -static void wake_up_page_bit(struct page *page, int bit_nr) +static void wake_up_folio_bit(struct folio *folio, int bit_nr) { - wait_queue_head_t *q = page_waitqueue(page); + wait_queue_head_t *q = page_waitqueue(&folio->page); struct wait_page_key key; unsigned long flags; wait_queue_entry_t bookmark; - key.page = page; + key.page = &folio->page; key.bit_nr = bit_nr; key.page_match = 0; @@ -1136,7 +1136,7 @@ static void wake_up_page_bit(struct page *page, int bit_nr) * page waiters. */ if (!waitqueue_active(q) || !key.page_match) { - ClearPageWaiters(page); + ClearFolioWaiters(folio); /* * It's possible to miss clearing Waiters here, when we woke * our page waiters, but the hashed waitqueue has waiters for @@ -1152,7 +1152,7 @@ static void wake_up_folio(struct folio *folio, int bit) { if (!FolioWaiters(folio)) return; - wake_up_page_bit(&folio->page, bit); + wake_up_folio_bit(folio, bit); } /* @@ -1417,7 +1417,7 @@ void unlock_folio(struct folio *folio) BUILD_BUG_ON(PG_waiters != 7); VM_BUG_ON_FOLIO(!FolioLocked(folio), folio); if (clear_bit_unlock_is_negative_byte(PG_locked, folio_flags(folio))) - wake_up_page_bit(&folio->page, PG_locked); + wake_up_folio_bit(folio, PG_locked); } EXPORT_SYMBOL(unlock_folio); -- 2.30.0