From patchwork Tue Aug 8 06:50:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 9886653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 123E660352 for ; Tue, 8 Aug 2017 06:50:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01E032875E for ; Tue, 8 Aug 2017 06:50:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA58C287A9; Tue, 8 Aug 2017 06:50:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 95DBD2875E for ; Tue, 8 Aug 2017 06:50:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B6CB921E0C2E1; Mon, 7 Aug 2017 23:48:18 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from lgeamrelo11.lge.com (LGEAMRELO11.lge.com [156.147.23.51]) by ml01.01.org (Postfix) with ESMTP id 61F2E21DFE928 for ; Mon, 7 Aug 2017 23:48:16 -0700 (PDT) Received: from unknown (HELO lgeamrelo04.lge.com) (156.147.1.127) by 156.147.23.51 with ESMTP; 8 Aug 2017 15:50:31 +0900 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: minchan@kernel.org Received: from unknown (HELO localhost.localdomain) (10.177.220.163) by 156.147.1.127 with ESMTP; 8 Aug 2017 15:50:31 +0900 X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org From: Minchan Kim To: Andrew Morton Subject: [PATCH v1 3/6] mm:swap: remove end_swap_bio_write argument Date: Tue, 8 Aug 2017 15:50:21 +0900 Message-Id: <1502175024-28338-4-git-send-email-minchan@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502175024-28338-1-git-send-email-minchan@kernel.org> References: <1502175024-28338-1-git-send-email-minchan@kernel.org> X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , jack@suse.cz, linux-nvdimm@lists.01.org, Dave Chinner , Minchan Kim , linux-kernel@vger.kernel.org, Matthew Wilcox , Christoph Hellwig , linux-mm@kvack.org, kernel-team , seungho1.park@lge.com, "karam . lee" MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Every caller of __swap_writepage uses end_swap_bio_write as end_write_func argument so the argument is pointless. Remove it. Signed-off-by: Minchan Kim --- include/linux/swap.h | 3 +-- mm/page_io.c | 7 +++---- mm/zswap.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 76f1632eea5a..ae3da979a7b7 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -336,8 +336,7 @@ extern void kswapd_stop(int nid); extern int swap_readpage(struct page *page, bool do_poll); extern int swap_writepage(struct page *page, struct writeback_control *wbc); extern void end_swap_bio_write(struct bio *bio); -extern int __swap_writepage(struct page *page, struct writeback_control *wbc, - bio_end_io_t end_write_func); +extern int __swap_writepage(struct page *page, struct writeback_control *wbc); extern int swap_set_page_dirty(struct page *page); int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, diff --git a/mm/page_io.c b/mm/page_io.c index 20139b90125a..3502a97f7c48 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -254,7 +254,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc) end_page_writeback(page); goto out; } - ret = __swap_writepage(page, wbc, end_swap_bio_write); + ret = __swap_writepage(page, wbc); out: return ret; } @@ -273,8 +273,7 @@ static inline void count_swpout_vm_event(struct page *page) count_vm_events(PSWPOUT, hpage_nr_pages(page)); } -int __swap_writepage(struct page *page, struct writeback_control *wbc, - bio_end_io_t end_write_func) +int __swap_writepage(struct page *page, struct writeback_control *wbc) { struct bio *bio; int ret; @@ -329,7 +328,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, } ret = 0; - bio = get_swap_bio(GFP_NOIO, page, end_write_func); + bio = get_swap_bio(GFP_NOIO, page, end_swap_bio_write); if (bio == NULL) { set_page_dirty(page); unlock_page(page); diff --git a/mm/zswap.c b/mm/zswap.c index d39581a076c3..38db258515b5 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -900,7 +900,7 @@ static int zswap_writeback_entry(struct zpool *pool, unsigned long handle) SetPageReclaim(page); /* start writeback */ - __swap_writepage(page, &wbc, end_swap_bio_write); + __swap_writepage(page, &wbc); put_page(page); zswap_written_back_pages++;