All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Christoph Hellwig <hch@lst.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@suse.cz>, Al Viro <viro@zeniv.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 4/6] fs: Remove anon_set_page_dirty()
Date: Tue, 15 Jun 2021 17:23:40 +0100	[thread overview]
Message-ID: <20210615162342.1669332-5-willy@infradead.org> (raw)
In-Reply-To: <20210615162342.1669332-1-willy@infradead.org>

Use __set_page_dirty_no_writeback() instead.  This will set the dirty
bit on the page, which will be used to avoid calling set_page_dirty()
in the future.  It will have no effect on actually writing the page
back, as the pages are not on any LRU lists.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/libfs.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/fs/libfs.c b/fs/libfs.c
index 2d7f086b93d6..3fdd89b156d6 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1217,19 +1217,10 @@ void kfree_link(void *p)
 }
 EXPORT_SYMBOL(kfree_link);
 
-/*
- * nop .set_page_dirty method so that people can use .page_mkwrite on
- * anon inodes.
- */
-static int anon_set_page_dirty(struct page *page)
-{
-	return 0;
-};
-
 struct inode *alloc_anon_inode(struct super_block *s)
 {
 	static const struct address_space_operations anon_aops = {
-		.set_page_dirty = anon_set_page_dirty,
+		.set_page_dirty = __set_page_dirty_no_writeback,
 	};
 	struct inode *inode = new_inode_pseudo(s);
 
-- 
2.30.2


  parent reply	other threads:[~2021-06-15 16:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 16:23 [PATCH 0/6] Further set_page_dirty cleanups Matthew Wilcox (Oracle)
2021-06-15 16:23 ` [PATCH 1/6] mm/writeback: Move __set_page_dirty() to core mm Matthew Wilcox (Oracle)
2021-06-15 16:35   ` Christoph Hellwig
2021-06-15 17:17   ` Greg Kroah-Hartman
2021-06-16 16:14   ` Matthew Wilcox
2021-06-15 16:23 ` [PATCH 2/6] mm/writeback: Use __set_page_dirty in __set_page_dirty_nobuffers Matthew Wilcox (Oracle)
2021-06-15 16:35   ` Christoph Hellwig
2021-06-15 17:18   ` Greg Kroah-Hartman
2021-06-15 16:23 ` [PATCH 3/6] iomap: Use __set_page_dirty_nobuffers Matthew Wilcox (Oracle)
2021-06-15 16:37   ` Christoph Hellwig
2021-06-15 17:19   ` Greg Kroah-Hartman
2021-06-15 17:32     ` Matthew Wilcox
2021-06-15 17:34       ` Christoph Hellwig
2021-06-15 18:04         ` Greg Kroah-Hartman
2021-06-15 18:13         ` Matthew Wilcox
2021-06-16  6:50           ` Greg Kroah-Hartman
2021-06-16 16:28             ` Matthew Wilcox
2021-06-16 16:35               ` Greg Kroah-Hartman
2021-06-15 16:23 ` Matthew Wilcox (Oracle) [this message]
2021-06-15 16:37   ` [PATCH 4/6] fs: Remove anon_set_page_dirty() Christoph Hellwig
2021-06-15 16:23 ` [PATCH 5/6] fs: Remove noop_set_page_dirty() Matthew Wilcox (Oracle)
2021-06-15 16:38   ` Christoph Hellwig
2021-06-16 18:10   ` kernel test robot
2021-06-16 18:10     ` kernel test robot
2021-06-16 18:12     ` Matthew Wilcox
2021-06-16 18:12       ` Matthew Wilcox
2021-06-16 22:33   ` kernel test robot
2021-06-16 22:33     ` kernel test robot
2021-06-15 16:23 ` [PATCH 6/6] mm: Move page dirtying prototypes from mm.h Matthew Wilcox (Oracle)
2021-06-15 16:39   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210615162342.1669332-5-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.