Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp172596ybp; Thu, 3 Oct 2019 11:50:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwI44D6UboUwR4k/JGp4a/CCoUqoeHZo9fL3d/AaqeU2JfgfJswBxRlFs1QZPG48WMBf6It X-Received: by 2002:a17:906:57c3:: with SMTP id u3mr8850201ejr.303.1570128601319; Thu, 03 Oct 2019 11:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570128601; cv=none; d=google.com; s=arc-20160816; b=uhmfCvKhDtPis8G9YL+PPIkSBfJOoPX7T19R4k3x6bIhW9/iouTk1ERwLx2en0oAcC m9kpsbP8avx4ENmVHIK818rcqBi+rDoGRMZglE/NiFZXudkWNP+X6d0Bnq0BS3aXSJF6 BJ5uiTolT+GCMTQkseVPSs6OcVQDXhdDgUOaPMQVHdI5JJpwIj8Ra+IdO6wyDcA1f2/I i+SiovOIDPP15ilhy2/11F8obgXukwlVSwlWoW7tLJJIa6AfbFgrligEdM+NIKVDJ1xY B28kLSVbvWnT/r2jMQWxHTYr4e5zNcQJVR+FqgoiySrAi/8BmtsPgLPj9be3G/ENVXdb ezOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=UOV7TGB1E/qWhJ4etX1hYLYVbr+QYmJE5S39cVqnAW4=; b=qjBxQidjGR9WU1MgyLSdrvT/VfxeeScmceeIHImZ84CPagGTEyV8kzhuiiY18MmWCM hMD5V4/dfKUN7gwdX04/c0r2fu9ybIgpwl5h48l4H8RXnlXBZjw0xbi+M4IMckl9LMUy 9+EYztTYcItYCBGbxR9GHiztJxQBLPg9d37l2ur3twfvspiKN4u2xK7BHB9jbF26O9aE tptywhWkRWq3TJpWVHymSXtRsisNyuQh9+HcztoeQajjXgGuvZGUyBzkaQEH/GC9Ya0u mitaLcjM03lWoQL+LsZg/Haqzvj4+AvfchDdsJmMyDgmE/ozJvgMr6VJDex3hMee5pIf aBcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si2322975edj.201.2019.10.03.11.49.36; Thu, 03 Oct 2019 11:50:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390295AbfJCRmC (ORCPT + 99 others); Thu, 3 Oct 2019 13:42:02 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:39776 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731045AbfJCRl7 (ORCPT ); Thu, 3 Oct 2019 13:41:59 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04391;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Te19PA9_1570124498; Received: from e19h19392.et15sqa.tbsite.net(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0Te19PA9_1570124498) by smtp.aliyun-inc.com(127.0.0.1); Fri, 04 Oct 2019 01:41:56 +0800 From: Yang Shi To: mgorman@techsingularity.net, hannes@cmpxchg.org, mhocko@suse.com, akpm@linux-foundation.org Cc: yang.shi@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: vmscan: remove unused scan_control parameter from pageout() Date: Fri, 4 Oct 2019 01:41:38 +0800 Message-Id: <1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since lumpy reclaim was removed in v3.5 scan_control is not used by may_write_to_{queue|inode} and pageout() anymore, remove the unused parameter. Cc: Mel Gorman Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Yang Shi --- mm/vmscan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index e5d52d6..17489b8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -774,7 +774,7 @@ static inline int is_page_cache_freeable(struct page *page) return page_count(page) - page_has_private(page) == 1 + page_cache_pins; } -static int may_write_to_inode(struct inode *inode, struct scan_control *sc) +static int may_write_to_inode(struct inode *inode) { if (current->flags & PF_SWAPWRITE) return 1; @@ -822,8 +822,7 @@ static void handle_write_error(struct address_space *mapping, * pageout is called by shrink_page_list() for each dirty page. * Calls ->writepage(). */ -static pageout_t pageout(struct page *page, struct address_space *mapping, - struct scan_control *sc) +static pageout_t pageout(struct page *page, struct address_space *mapping) { /* * If the page is dirty, only perform writeback if that write @@ -859,7 +858,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping, } if (mapping->a_ops->writepage == NULL) return PAGE_ACTIVATE; - if (!may_write_to_inode(mapping->host, sc)) + if (!may_write_to_inode(mapping->host)) return PAGE_KEEP; if (clear_page_dirty_for_io(page)) { @@ -1396,7 +1395,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, * starts and then write it out here. */ try_to_unmap_flush_dirty(); - switch (pageout(page, mapping, sc)) { + switch (pageout(page, mapping)) { case PAGE_KEEP: goto keep_locked; case PAGE_ACTIVATE: -- 1.8.3.1