From patchwork Tue Jun 15 16:23:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12322375 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 494D0C48BE5 for ; Tue, 15 Jun 2021 16:27:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F079D6162A for ; Tue, 15 Jun 2021 16:27:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F079D6162A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 945926B006E; Tue, 15 Jun 2021 12:27:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F54B6B0072; Tue, 15 Jun 2021 12:27:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BD556B0073; Tue, 15 Jun 2021 12:27:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 4D02F6B006E for ; Tue, 15 Jun 2021 12:27:23 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E4A35EFA0 for ; Tue, 15 Jun 2021 16:27:22 +0000 (UTC) X-FDA: 78256488324.01.6C8C716 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf11.hostedemail.com (Postfix) with ESMTP id 3159B2001105 for ; Tue, 15 Jun 2021 16:27:11 +0000 (UTC) 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=tEikZHVbQy/CarH94Sq7Qfka7DsiKOsOPQjFqQ1Nn/k=; b=EuMLwmM8ZNhXiP2UeZbfChyRBM JFYrf72i3Ivdlub5GRCQ3m1NMjoTVNH5+J+UrY7JL5Wb3qCc9BM/YfzKNaq5QLdtP3/0rqE9wu/r9 aBJfXMBzVuxZz/K9JcIfXX1E85xSxDwAAMKUO+sBcjQqiY10Mbx4kxskb46H5d+aji/hSCPT7OSgo jbSfjm61sOxnsJahd5eO4fTpPPwoyKHt2uf2PwPbpOUPBYuJl0rTZgJ2dpLa2mB5Jk4v73kvyHAIR zl3JzWL03+qMtaPswsVTeTWxsVOeoGPo2C3H28h8srkwmOuaoIP+rkC+UePo/DLLqhup0mraV0Bco J1q5hzlA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltBt5-0070Uw-FO; Tue, 15 Jun 2021 16:26:07 +0000 From: "Matthew Wilcox (Oracle)" To: Christoph Hellwig , Andrew Morton , Jan Kara , Al Viro , Greg Kroah-Hartman , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH 6/6] mm: Move page dirtying prototypes from mm.h Date: Tue, 15 Jun 2021 17:23:42 +0100 Message-Id: <20210615162342.1669332-7-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210615162342.1669332-1-willy@infradead.org> References: <20210615162342.1669332-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 3159B2001105 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=EuMLwmM8; spf=none (imf11.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: khuaamh9nxrxbzc4jm93hxzxh37exkg4 X-HE-Tag: 1623774431-983783 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: These functions implement the address_space ->set_page_dirty operation and should live in pagemap.h, not mm.h so that the rest of the kernel doesn't get funny ideas about calling them directly. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig --- fs/fuse/dax.c | 1 + fs/zonefs/super.c | 2 +- include/linux/mm.h | 3 --- include/linux/pagemap.h | 4 ++++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index 515ad0895345..fb733eb5aead 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 3aacf016c7c2..dbf03635869c 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -5,7 +5,7 @@ * Copyright (C) 2019 Western Digital Corporation or its affiliates. */ #include -#include +#include #include #include #include diff --git a/include/linux/mm.h b/include/linux/mm.h index 1086b556961a..5608f75ecc80 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1853,9 +1853,6 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); extern void do_invalidatepage(struct page *page, unsigned int offset, unsigned int length); -void __set_page_dirty(struct page *, struct address_space *, int warn); -int __set_page_dirty_nobuffers(struct page *page); -int __set_page_dirty_no_writeback(struct page *page); int redirty_page_for_writepage(struct writeback_control *wbc, struct page *page); void account_page_cleaned(struct page *page, struct address_space *mapping, diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 5f0582de24e7..090e45616172 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -752,6 +752,10 @@ int wait_on_page_writeback_killable(struct page *page); extern void end_page_writeback(struct page *page); void wait_for_stable_page(struct page *page); +void __set_page_dirty(struct page *, struct address_space *, int warn); +int __set_page_dirty_nobuffers(struct page *page); +int __set_page_dirty_no_writeback(struct page *page); + void page_endio(struct page *page, bool is_write, int err); /**