linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
To: akpm@linux-foundation.org, viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	david@fromorbit.com, hch@infradead.org, willy@infradead.org,
	Guoqing Jiang <guoqing.jiang@cloud.ionos.com>,
	Song Liu <song@kernel.org>,
	linux-raid@vger.kernel.org
Subject: [PATCH 02/10] md: remove __clear_page_buffers and use attach/detach_page_private
Date: Sun, 17 May 2020 23:47:10 +0200	[thread overview]
Message-ID: <20200517214718.468-3-guoqing.jiang@cloud.ionos.com> (raw)
In-Reply-To: <20200517214718.468-1-guoqing.jiang@cloud.ionos.com>

After introduce attach/detach_page_private in pagemap.h, we can remove
the duplicat code and call the new functions.

Cc: Song Liu <song@kernel.org>
Cc: linux-raid@vger.kernel.org
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
---
No change since RFC V3.

RFC V2 -> RFC V3
1. rename clear_page_private to detach_page_private.

RFC -> RFC V2
1. change the name of new functions to attach/clear_page_private.

 drivers/md/md-bitmap.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index b952bd45bd6a..95a5f3757fa3 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -324,14 +324,6 @@ static void end_bitmap_write(struct buffer_head *bh, int uptodate)
 		wake_up(&bitmap->write_wait);
 }
 
-/* copied from buffer.c */
-static void
-__clear_page_buffers(struct page *page)
-{
-	ClearPagePrivate(page);
-	set_page_private(page, 0);
-	put_page(page);
-}
 static void free_buffers(struct page *page)
 {
 	struct buffer_head *bh;
@@ -345,7 +337,7 @@ static void free_buffers(struct page *page)
 		free_buffer_head(bh);
 		bh = next;
 	}
-	__clear_page_buffers(page);
+	detach_page_private(page);
 	put_page(page);
 }
 
@@ -374,7 +366,7 @@ static int read_page(struct file *file, unsigned long index,
 		ret = -ENOMEM;
 		goto out;
 	}
-	attach_page_buffers(page, bh);
+	attach_page_private(page, bh);
 	blk_cur = index << (PAGE_SHIFT - inode->i_blkbits);
 	while (bh) {
 		block = blk_cur;
-- 
2.17.1


  parent reply	other threads:[~2020-05-17 21:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 21:47 [PATCH 00/10] Introduce attach/detach_page_private to cleanup code Guoqing Jiang
2020-05-17 21:47 ` [PATCH 01/10] include/linux/pagemap.h: introduce attach/detach_page_private Guoqing Jiang
2020-05-17 21:47 ` Guoqing Jiang [this message]
2020-05-17 21:47 ` [PATCH 03/10] btrfs: use attach/detach_page_private Guoqing Jiang
2020-05-17 21:47 ` [PATCH 04/10] fs/buffer.c: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 05/10] f2fs: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 06/10] iomap: " Guoqing Jiang
2020-05-17 21:47 ` [PATCH 07/10] ntfs: replace attach_page_buffers with attach_page_private Guoqing Jiang
2020-05-17 21:47 ` [PATCH 08/10] orangefs: use attach/detach_page_private Guoqing Jiang
2020-05-26 21:54   ` Mike Marshall
2020-05-28  8:39     ` Guoqing Jiang
2020-05-17 21:47 ` [PATCH 09/10] buffer_head.h: remove attach_page_buffers Guoqing Jiang
2020-05-17 21:47 ` [PATCH 10/10] mm/migrate.c: call detach_page_private to cleanup code Guoqing Jiang
2020-05-19  5:12   ` Andrew Morton
2020-05-19  7:35     ` Guoqing Jiang
2020-05-19 10:06       ` Gao Xiang
2020-05-19 11:02         ` Guoqing Jiang
2020-05-19 11:31           ` Gao Xiang
2020-05-19 15:16         ` Matthew Wilcox
2020-05-19 15:27           ` Gao Xiang
2020-05-19 20:44       ` Guoqing Jiang
2020-05-21 22:52   ` Dave Chinner
2020-05-22  7:18     ` Guoqing Jiang
2020-05-22 23:53       ` Andrew Morton
2020-05-24 19:02         ` Guoqing Jiang

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=20200517214718.468-3-guoqing.jiang@cloud.ionos.com \
    --to=guoqing.jiang@cloud.ionos.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).