summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-10 11:42:26 +0300
committerLuis Chamberlain <mcgrof@kernel.org>2023-04-13 21:49:35 +0300
commitf5d2b92c85d420d0020163b9ad153962d8f9fcc7 (patch)
tree6179f53149a3ae2743aac80bd61a0952c590b0cc /fs/xfs
parenta2189b77676b256b6606612fd68ed493f7080929 (diff)
downloadlinux-f5d2b92c85d420d0020163b9ad153962d8f9fcc7.tar.xz
xfs: simplify two-level sysctl registration for xfs_table
There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_sysctl.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/fs/xfs/xfs_sysctl.c b/fs/xfs/xfs_sysctl.c
index 546a6cd96729..fade33735393 100644
--- a/fs/xfs/xfs_sysctl.c
+++ b/fs/xfs/xfs_sysctl.c
@@ -210,28 +210,10 @@ static struct ctl_table xfs_table[] = {
{}
};
-static struct ctl_table xfs_dir_table[] = {
- {
- .procname = "xfs",
- .mode = 0555,
- .child = xfs_table
- },
- {}
-};
-
-static struct ctl_table xfs_root_table[] = {
- {
- .procname = "fs",
- .mode = 0555,
- .child = xfs_dir_table
- },
- {}
-};
-
int
xfs_sysctl_register(void)
{
- xfs_table_header = register_sysctl_table(xfs_root_table);
+ xfs_table_header = register_sysctl("fs/xfs", xfs_table);
if (!xfs_table_header)
return -ENOMEM;
return 0;