Message ID | 20231107-jag-sysctl_remove_empty_elem_fs-v1-0-7176632fea9f@samsung.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC6C9C4167D for <linux-mm@archiver.kernel.org>; Tue, 7 Nov 2023 13:44:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2C1858D0041; Tue, 7 Nov 2023 08:44:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 220AC8D003B; Tue, 7 Nov 2023 08:44:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0730A8D0041; Tue, 7 Nov 2023 08:44:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D78CE8D003B for <linux-mm@kvack.org>; Tue, 7 Nov 2023 08:44:50 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id AA5851A0426 for <linux-mm@kvack.org>; Tue, 7 Nov 2023 13:44:50 +0000 (UTC) X-FDA: 81431278740.16.4187A70 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf02.hostedemail.com (Postfix) with ESMTP id 0CDEB8001B; Tue, 7 Nov 2023 13:44:47 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ERDEsjJ3; spf=pass (imf02.hostedemail.com: domain of devnull+j.granados.samsung.com@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=devnull+j.granados.samsung.com@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699364688; a=rsa-sha256; cv=none; b=xc1FQDfCvq6FLYikU00GKUbcrUL50Ba/OrV9rHfbnZWpu7Qfe+slZM6oGzektpNbYZnivi 9v+0ehVTKyza80KoSOBn929wjB04iPVHfowzTE6u7WLrOAjxlcEDKZp0ArqT2sl52H0xqF 0cb8gnFw+abKQAzDc1fr2ozlM2ay11s= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ERDEsjJ3; spf=pass (imf02.hostedemail.com: domain of devnull+j.granados.samsung.com@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=devnull+j.granados.samsung.com@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699364688; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=i3eEE97nUh64hYb+YdPOqGLydyNHyy+mucGg+aBHkD0=; b=rw7AC4+XNLyH5Iuku/+aJk3r3E2rhWiRTEzt9iQuAGoOmqXgEUgvRbqxuzII6XTjCr7aa4 2dMeHGA4ep7ZvdABasMvulH+PSs8U7/N4vQKX7WuUOJ1aJ7Sjsuk6glrcRpSPZ8NpGtAnE 4AS7s7Hd1DUDx7lPrVphayY8KJS7nQM= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BDCC361215; Tue, 7 Nov 2023 13:44:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 60C3BC433C7; Tue, 7 Nov 2023 13:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699364686; bh=BX2Tgmusj22t2ImeDH/Db41rnYDA2OpBkrkY6HkG4Vg=; h=From:Subject:Date:To:Cc:Reply-To:From; b=ERDEsjJ3jcdzHK7bGuPyilBC+mNvR9achV7BxWqpA9vmn/7dGCm2UD8je32dYJ0yL EH/z/AlZTTt5tMCVS0Ztel5kr8+H7vRNE9cqWDzpShnGJEL4Q0duuzuFZvDWAul9A+ NwrIR3u7rOZwPqZ4diVaGnkW36pVZ4UPFUueEFvVVlnFD8TUnTCM5E5TDh4te6Qm2m r1VV0TjIlTUso7Dufe1ctz5VLG6uvzr1ig+xGdcPBkQPBVIYmkZpgw062kQ+O6lnOy xspmbVbYYGYlLwU1k3f0ClKiUvpn0FMp4PNbZZuYJBCY95YoMVloKemUIAasvsO86p AW3wn0D1cl9vg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B81AC4332F; Tue, 7 Nov 2023 13:44:46 +0000 (UTC) From: Joel Granados via B4 Relay <devnull+j.granados.samsung.com@kernel.org> Subject: [PATCH 0/4] sysctl: Remove sentinel elements from fs dir Date: Tue, 07 Nov 2023 14:44:19 +0100 Message-Id: <20231107-jag-sysctl_remove_empty_elem_fs-v1-0-7176632fea9f@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIADQ/SmUC/x3NQQqDMBBG4avIrBswFrV4FSlBkz86xahkRCri3 Q0uv817JwkiQ6jJTorYWXiZE/QrIzt28wDFLpmKvHhrndfq1w1KDrHbZCLCssMgrNthMCEYL8r 1zvqq/Gjfg1JljfD8fw7t97pun+G/83EAAAA= To: Luis Chamberlain <mcgrof@kernel.org>, willy@infradead.org, josh@joshtriplett.org, Kees Cook <keescook@chromium.org>, David Howells <dhowells@redhat.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Benjamin LaHaise <bcrl@kvack.org>, Eric Biederman <ebiederm@xmission.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <anna@kernel.org>, Chuck Lever <chuck.lever@oracle.com>, Jeff Layton <jlayton@kernel.org>, Neil Brown <neilb@suse.de>, Olga Kornievskaia <kolga@netapp.com>, Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>, Jan Kara <jack@suse.cz>, Amir Goldstein <amir73il@gmail.com>, Matthew Bobrowski <repnop@google.com>, Anton Altaparmakov <anton@tuxera.com>, Namjae Jeon <linkinjeon@kernel.org>, Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>, Joseph Qi <joseph.qi@linux.alibaba.com>, Iurii Zaikin <yzaikin@google.com>, Eric Biggers <ebiggers@kernel.org>, "Theodore Y. Ts'o" <tytso@mit.edu>, Chandan Babu R <chandan.babu@oracle.com>, "Darrick J. Wong" <djwong@kernel.org>, Jan Harkes <jaharkes@cs.cmu.edu>, coda@cs.cmu.edu Cc: linux-cachefs@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ocfs2-devel@lists.linux.dev, fsverity@lists.linux.dev, linux-xfs@vger.kernel.org, codalist@coda.cs.cmu.edu, Joel Granados <j.granados@samsung.com> X-Mailer: b4 0.13-dev-86aa5 X-Developer-Signature: v=1; a=openpgp-sha256; l=10141; i=j.granados@samsung.com; h=from:subject:message-id; bh=C3DmFO8Hz7l/cldXER9EIJKfHb6WTQfVYhuohw0jqAA=; b=owEB7QES/pANAwAKAbqXzVK3lkFPAcsmYgBlSj9LnKbg9Qxr7Dcd99rtLU0xLDCzZRMTGLwh9 e1zls1ye9uJAbMEAAEKAB0WIQSuRwlXJeYxJc7LJ5C6l81St5ZBTwUCZUo/SwAKCRC6l81St5ZB TznpC/9XunhpTHq+xhr6kaz5TZDhfTOnYmqXhvejjQi1MwmqTIgaQYEoUiM8w/0O2RIxJU9hChR oc3TSlJwhTQGpLQtD329xMm+cVx20uakbjIQXuXTZ0y/E8i1LgUSnxqVDKg3miAzLbNzdRqFmKX QxXwnz63qIkYH1Wcb90i08RJpCmWOgGwSZ+fg8GknruPYtsHMFRpFM7oghZ5SNY7h7d8e5rjP5i j9fRYr5WD34ytCrJaBKJsTemlRPKBtw8UNnHEPd9BzTQnRCCf6cC+czRbL7ygTKoa25lciGy6Nl 4jXSqUir9bE9+U2Uzf3PbjH+oJ90jjCmIjBmxghSOae4S6UByh+bWnzc3F23IpvLv/xHnr7pyHM +lNSgUCZhWV1RrN8Z0VWHX3h+PoKFmRDTlQwHMPmUGfW4SCFfY8fAXS5dq3W+Bda4cFz+7iQStz BDArwlJ7y7nT+ps9/4EHCT0yEwIT9FmOjOAOAGps9FiDih14BG3BGz4t4z09jACJz1wHo= X-Developer-Key: i=j.granados@samsung.com; a=openpgp; fpr=F1F8E46D30F0F6C4A45FF4465895FAAC338C6E77 X-Endpoint-Received: by B4 Relay for j.granados@samsung.com/default with auth_id=70 X-Original-From: Joel Granados <j.granados@samsung.com> Reply-To: <j.granados@samsung.com> X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 0CDEB8001B X-Stat-Signature: 875ydrqef3gy4tkcchf7przeghskt9do X-Rspam-User: X-HE-Tag: 1699364687-36183 X-HE-Meta: U2FsdGVkX1+8Eum6exzvhCSmPcdjimkNCpfLhLbGKnmernbCopfZRpDFKaYDKOXalxb9NQQH/iycca4FA1aG0GPS0DzjNapwtmmDLWZLwTLBjn/zhMSm4gHV1S037zzgYbC1xKOWrYQQ65h9QeEFw99B9gLAy3KFPxEIgP13jXaHJvzXfTwpUbPb291O50oNuI26BTUFg1rj1HkTqCmxlh6PhEOdObzs9Z2x40px6xs4GZGuOCZQr4oJP9nL6etTZUOX+dNA8BNSA95lSvUh9kXtvXIBpsffUYyqTjolwFagvcgLyS7ofL0lyLe/Bkv7C3uohr5iNNnnYfwr4rvhIo/tRaLNPkranGT95mI1lEiHM7XMf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8kG7jhqIo7r4mrekVZAZyNR8E1Q2dv1JQdfqgqQFIlQZJvQzUS2n+EUSe2RdVh61fCKhlAcvbIwJHyZqOtd+zZ+1+lHqhFpqm3q9vd1LwBpHBgt0Z0t3HHm+g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index c88854df0b62..e0073a627bac 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -976,6 +976,8 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set, table[0].procname = new_name; table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO; init_header(&new->header, set->dir.header.root, set, node, table, 1); + // Counts additional sentinel used for each new dir. + printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table)); return new; } @@ -1199,6 +1201,9 @@ static struct ctl_table_header *new_links(struct ctl_dir *dir, struct ctl_table_ link_name += len; link++; } + // Counts additional sentinel used for each new registration + // + printk("%ld sysctl saved mem kzalloc \n", sizeof(struct ctl_table)); init_header(links, dir->header.root, dir->header.set, node, link_table, head->ctl_table_size); links->nreg = nr_entries;