From patchwork Tue Jun 29 02:36:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12348995 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1A6A4C11F65 for ; Tue, 29 Jun 2021 02:36:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6FFB61D08 for ; Tue, 29 Jun 2021 02:36:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6FFB61D08 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2CC888D00B3; Mon, 28 Jun 2021 22:36:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27C828D008F; Mon, 28 Jun 2021 22:36:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 145098D00B3; Mon, 28 Jun 2021 22:36:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id E2D998D008F for ; Mon, 28 Jun 2021 22:36:31 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DD9608249980 for ; Tue, 29 Jun 2021 02:36:31 +0000 (UTC) X-FDA: 78305197782.35.AF8F9F4 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf11.hostedemail.com (Postfix) with ESMTP id 96FCA200109D for ; Tue, 29 Jun 2021 02:36:31 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A181C61D04; Tue, 29 Jun 2021 02:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1624934190; bh=bsKDSYkFH1W1S88dtxT6IO6YYh5weC6KFCgXbA6SOLQ=; h=Date:From:To:Subject:In-Reply-To:From; b=cFT9Q6fnjx8k8MpTkJB44tamHWZPLmyAXheGr6FhnDrBZdILPNv9PzzDWFdwyKfuq 2qaxXpcGiKPzhx1/CabRfKzpnDHeVVvPYl8X1X8E+2QqU0TZAHHT/aGP8s0jQ209jO V7xa7dAgLjCRQK0LU1FAdh867+g6SipWwVGL5wgg= Date: Mon, 28 Jun 2021 19:36:30 -0700 From: Andrew Morton To: akpm@linux-foundation.org, dan.j.williams@intel.com, gregkh@linuxfoundation.org, hch@lst.de, jack@suse.cz, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk, willy@infradead.org Subject: [patch 062/192] mm: move page dirtying prototypes from mm.h Message-ID: <20210629023630.7L277w5E4%akpm@linux-foundation.org> In-Reply-To: <20210628193256.008961950a714730751c1423@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=cFT9Q6fn; spf=pass (imf11.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 96FCA200109D X-Stat-Signature: cbjxer7p6mbqxb5n5cma4g6uz3riauf7 X-HE-Tag: 1624934191-406335 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: From: "Matthew Wilcox (Oracle)" Subject: mm: move page dirtying prototypes from mm.h 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. Link: https://lkml.kernel.org/r/20210615162342.1669332-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Cc: Al Viro Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jan Kara Signed-off-by: Andrew Morton --- 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(-) --- a/fs/fuse/dax.c~mm-move-page-dirtying-prototypes-from-mmh +++ a/fs/fuse/dax.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include --- a/fs/zonefs/super.c~mm-move-page-dirtying-prototypes-from-mmh +++ a/fs/zonefs/super.c @@ -5,7 +5,7 @@ * Copyright (C) 2019 Western Digital Corporation or its affiliates. */ #include -#include +#include #include #include #include --- a/include/linux/mm.h~mm-move-page-dirtying-prototypes-from-mmh +++ a/include/linux/mm.h @@ -1850,9 +1850,6 @@ extern int try_to_release_page(struct pa 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, --- a/include/linux/pagemap.h~mm-move-page-dirtying-prototypes-from-mmh +++ a/include/linux/pagemap.h @@ -702,6 +702,10 @@ int wait_on_page_writeback_killable(stru 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); /**