Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp280460ybz; Thu, 23 Apr 2020 23:45:48 -0700 (PDT) X-Google-Smtp-Source: APiQypIR6HVZGodwMibK74tEO9qcPrnY7FmXAT7Z3jJb+fqx2ggDayFPGkcsz+KTZxgUteLodKXt X-Received: by 2002:a17:906:72c8:: with SMTP id m8mr6082106ejl.318.1587710748138; Thu, 23 Apr 2020 23:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587710748; cv=none; d=google.com; s=arc-20160816; b=v91Un7NE0tL/LCahhSvIsBotS3AZgLpJUYQfCjswBn8/hu4M3g6KtqEEXto90SuxMx c0GGETKh2ZzpJkroC46NBOo3g09Yc4Zt76zrLHwNYnwHdGJWE5R5DoeQfKNysFKuKrH0 nphD1mvk+T+dl+p5ViOS/eFqPJEprCntUuHSqegBnwX8ES2QFJlobcJ7AiF7PKLgwC+g nxbYGF5CiyBC3tmzy52usAeBqlwxSt3C/yO1CZMTrb0lbJaw6PDruFmlF/6XIZiPGHiI H/5BaavaAU0edZDwuelX3SxhhzouPqGqvIqQS3FEVRbM9lVYzYwp3nEsGUnZjreTWw/f tWUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jnM+oj2VUNSYKW0ofW8Glb8puwR8BBAMw7xq43OT+Kg=; b=KiqwRWRxFmd5oAaJP63AKy5BYFr6bZbIl2Z/1T6tKsnmL6vXhNCg9lKvV7gjD6ZICU GeHqWEEgXVNyIQ4IC7CJaqboZNhmdoodnOM4bkAMLtWhN0iYpgWY738+taVMeNkZv/k4 qF+HlNSU8vlFl8meAnOik35GGBtFGni+myxpToq45YZKf9NsWEcCgxD/8a+wvoPFjCSZ ESl+BB1YBBgwjVR3/VQ8Gl9jO5D5Gmb0NHJulMRd2+XiR8BDRuPJsH1avPyOkcxx7Kwm ERDBO+s8DCwkCM+xy7jmoJlgTCpa87VCjo7Di6InWi7K8i2fl3UIcIU4KxNafPtt5hQg /ubQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JVuPjbsB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do17si2942468ejc.266.2020.04.23.23.45.24; Thu, 23 Apr 2020 23:45:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JVuPjbsB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbgDXGnv (ORCPT + 99 others); Fri, 24 Apr 2020 02:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726008AbgDXGnt (ORCPT ); Fri, 24 Apr 2020 02:43:49 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925AFC09B045; Thu, 23 Apr 2020 23:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=jnM+oj2VUNSYKW0ofW8Glb8puwR8BBAMw7xq43OT+Kg=; b=JVuPjbsB6SSw1dy6DoHtGc5M4K JsoBpBxRbkiQmRQ6soHqgz4vVexHwALAZJvob31s/STjS2Nxyoj2iN5PeESSZP8Mf+iNpAiMsT6h7 Oj8eeYpw4Bq88Tj3BheJaq/ROfRCxaLcbXAFCsLEizyU4woI+2gToqgp+jIXwwWa/zO0h9mr0SGkC 676mbQb7pXAwiYdGjQWoklAzfyqixyOz9zjLXa/19Ko8JhAY4hKniR8enrdX8tapcf7i+xYqn2qJQ ffjmy3lrUCfnwT8EJ/U9TsNbevjepyjqf3XklCPrY1orD8sg2QYzY4qZYXTQdONrNVmCRZwVPpGPG ICqgS32g==; Received: from [2001:4bb8:193:f203:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRs3u-00013c-96; Fri, 24 Apr 2020 06:43:46 +0000 From: Christoph Hellwig To: Kees Cook , Iurii Zaikin Cc: Alexei Starovoitov , Daniel Borkmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, David Rientjes Subject: [PATCH 2/5] mm: remove watermark_boost_factor_sysctl_handler Date: Fri, 24 Apr 2020 08:43:35 +0200 Message-Id: <20200424064338.538313-3-hch@lst.de> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200424064338.538313-1-hch@lst.de> References: <20200424064338.538313-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org watermark_boost_factor_sysctl_handler is just a pointless wrapper for proc_dointvec_minmax, so remove it and use proc_dointvec_minmax directly. Signed-off-by: Christoph Hellwig Acked-by: David Rientjes --- include/linux/mmzone.h | 2 -- kernel/sysctl.c | 2 +- mm/page_alloc.c | 12 ------------ 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 1b9de7d220fb7..f37bb8f187fc7 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -911,8 +911,6 @@ static inline int is_highmem(struct zone *zone) struct ctl_table; int min_free_kbytes_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); -int watermark_boost_factor_sysctl_handler(struct ctl_table *, int, - void __user *, size_t *, loff_t *); int watermark_scale_factor_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES]; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 8a176d8727a3a..99d27acf46465 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1491,7 +1491,7 @@ static struct ctl_table vm_table[] = { .data = &watermark_boost_factor, .maxlen = sizeof(watermark_boost_factor), .mode = 0644, - .proc_handler = watermark_boost_factor_sysctl_handler, + .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, }, { diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 69827d4fa0527..62c1550cd43ec 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7978,18 +7978,6 @@ int min_free_kbytes_sysctl_handler(struct ctl_table *table, int write, return 0; } -int watermark_boost_factor_sysctl_handler(struct ctl_table *table, int write, - void __user *buffer, size_t *length, loff_t *ppos) -{ - int rc; - - rc = proc_dointvec_minmax(table, write, buffer, length, ppos); - if (rc) - return rc; - - return 0; -} - int watermark_scale_factor_sysctl_handler(struct ctl_table *table, int write, void __user *buffer, size_t *length, loff_t *ppos) { -- 2.26.1