From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: + fs-bufferc-use-attach-detach_page_private.patch added to -mm tree Date: Mon, 18 May 2020 14:46:16 -0700 Message-ID: <20200518214616.Vu-blRQpB%akpm@linux-foundation.org> References: <20200513175005.1f4839360c18c0238df292d1@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.kernel.org ([198.145.29.99]:49768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726831AbgERVqS (ORCPT ); Mon, 18 May 2020 17:46:18 -0400 In-Reply-To: <20200513175005.1f4839360c18c0238df292d1@linux-foundation.org> Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: guoqing.jiang@cloud.ionos.com, mm-commits@vger.kernel.org, viro@zeniv.linux.org.uk The patch titled Subject: fs/buffer.c: use attach/detach_page_private has been added to the -mm tree. Its filename is fs-bufferc-use-attach-detach_page_private.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/fs-bufferc-use-attach-detach_page_private.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/fs-bufferc-use-attach-detach_page_private.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Guoqing Jiang Subject: fs/buffer.c: use attach/detach_page_private Since the new pair function is introduced, we can call them to clean the code in buffer.c. Link: http://lkml.kernel.org/r/20200517214718.468-5-guoqing.jiang@cloud.ionos.com Signed-off-by: Guoqing Jiang Cc: Alexander Viro Signed-off-by: Andrew Morton --- fs/buffer.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) --- a/fs/buffer.c~fs-bufferc-use-attach-detach_page_private +++ a/fs/buffer.c @@ -123,14 +123,6 @@ void __wait_on_buffer(struct buffer_head } EXPORT_SYMBOL(__wait_on_buffer); -static void -__clear_page_buffers(struct page *page) -{ - ClearPagePrivate(page); - set_page_private(page, 0); - put_page(page); -} - static void buffer_io_error(struct buffer_head *bh, char *msg) { if (!test_bit(BH_Quiet, &bh->b_state)) @@ -906,7 +898,7 @@ link_dev_buffers(struct page *page, stru bh = bh->b_this_page; } while (bh); tail->b_this_page = head; - attach_page_buffers(page, head); + attach_page_private(page, head); } static sector_t blkdev_max_block(struct block_device *bdev, unsigned int size) @@ -1587,7 +1579,7 @@ void create_empty_buffers(struct page *p bh = bh->b_this_page; } while (bh != head); } - attach_page_buffers(page, head); + attach_page_private(page, head); spin_unlock(&page->mapping->private_lock); } EXPORT_SYMBOL(create_empty_buffers); @@ -2574,7 +2566,7 @@ static void attach_nobh_buffers(struct p bh->b_this_page = head; bh = bh->b_this_page; } while (bh != head); - attach_page_buffers(page, head); + attach_page_private(page, head); spin_unlock(&page->mapping->private_lock); } @@ -3234,7 +3226,7 @@ drop_buffers(struct page *page, struct b bh = next; } while (bh != head); *buffers_to_free = head; - __clear_page_buffers(page); + detach_page_private(page); return 1; failed: return 0; _ Patches currently in -mm which might be from guoqing.jiang@cloud.ionos.com are include-linux-pagemaph-introduce-attach-detach_page_private.patch md-remove-__clear_page_buffers-and-use-attach-detach_page_private.patch btrfs-use-attach-detach_page_private.patch fs-bufferc-use-attach-detach_page_private.patch f2fs-use-attach-detach_page_private.patch iomap-use-attach-detach_page_private.patch ntfs-replace-attach_page_buffers-with-attach_page_private.patch orangefs-use-attach-detach_page_private.patch buffer_headh-remove-attach_page_buffers.patch mm-migratec-call-detach_page_private-to-cleanup-code.patch