From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCC64C74A4B for ; Fri, 10 Mar 2023 23:13:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231493AbjCJXNH (ORCPT ); Fri, 10 Mar 2023 18:13:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231261AbjCJXND (ORCPT ); Fri, 10 Mar 2023 18:13:03 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A506F9028; Fri, 10 Mar 2023 15:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=KO2HxTUOZzbjQ3y76wpSpZnZj3+bp1GiNAt8DWUNdxU=; b=k6dL7lF5h50jRNr0sP1WQeyO2+ eYsLqyIE9wANrimmvLh1SLKSaKAQLXJUk1alQIuj4XBGvJRj9uRieruhcs+U6SV+HR+VvPc1UPSuY OCc8YZiS6Kb6vpacPRdCb765jGYyQ6mzFufMLIU/iSRNrAp5CXlIIMcmb0RuF4weYhUKE0HejaRS4 jhrpz+NLg0h7aljcxQP1MoA91eAVuC2Z15E+ZXUHvRkn9mDApq0e9at52A/DmXtjojSQ7Fenv5WEO k+NlhBWmlWjDlx6pKRtetpvCU+1DPxNSA7GfdJg2p1cN+xRBYPPZpZa9blNrjwlGC0KgFPyFFinA6 UUi2v2Bw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1paluB-00GaJN-BZ; Fri, 10 Mar 2023 23:12:07 +0000 From: Luis Chamberlain To: dhowells@redhat.com, linux-cachefs@redhat.com, jack@suse.com, jaharkes@cs.cmu.edu, coda@cs.cmu.edu, codalist@coda.cs.cmu.edu, anton@tuxera.com, linux-ntfs-dev@lists.sourceforge.net Cc: ebiederm@xmission.com, keescook@chromium.org, yzaikin@google.com, j.granados@samsung.com, patches@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 5/5] ntfs: simplfy one-level sysctl registration for ntfs_sysctls Date: Fri, 10 Mar 2023 15:12:06 -0800 Message-Id: <20230310231206.3952808-6-mcgrof@kernel.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230310231206.3952808-1-mcgrof@kernel.org> References: <20230310231206.3952808-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain --- fs/ntfs/sysctl.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c index a030d00af90c..174fe536a1c0 100644 --- a/fs/ntfs/sysctl.c +++ b/fs/ntfs/sysctl.c @@ -31,16 +31,6 @@ static struct ctl_table ntfs_sysctls[] = { {} }; -/* Define the parent directory /proc/sys/fs. */ -static struct ctl_table sysctls_root[] = { - { - .procname = "fs", - .mode = 0555, - .child = ntfs_sysctls - }, - {} -}; - /* Storage for the sysctls header. */ static struct ctl_table_header *sysctls_root_table; @@ -54,7 +44,7 @@ int ntfs_sysctl(int add) { if (add) { BUG_ON(sysctls_root_table); - sysctls_root_table = register_sysctl_table(sysctls_root); + sysctls_root_table = register_sysctl("fs", ntfs_sysctls); if (!sysctls_root_table) return -ENOMEM; } else { -- 2.39.1