diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-02 12:28:24 -0800 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2023-03-27 21:17:02 -0700 |
commit | 1238c8b91c5aca6dd13bccb1b4dc716718e7bfac (patch) | |
tree | 4f1cda8282ee8dd6e0fcd4c77d31ad71dd9ccbfb /fs/verity | |
parent | 8b7d3fe96881e0f13c0176812b40432558882023 (diff) | |
download | linux-1238c8b91c5aca6dd13bccb1b4dc716718e7bfac.tar.gz linux-1238c8b91c5aca6dd13bccb1b4dc716718e7bfac.tar.bz2 linux-1238c8b91c5aca6dd13bccb1b4dc716718e7bfac.zip |
fs-verity: simplify sysctls with register_sysctl()
register_sysctl_paths() is only needed if your child (directories) have
entries but this does not so just use register_sysctl() so to do away
with the path specification.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230302202826.776286-10-mcgrof@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/verity')
-rw-r--r-- | fs/verity/signature.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/verity/signature.c b/fs/verity/signature.c index e7d3ca919a1e..b8c51ad40d3a 100644 --- a/fs/verity/signature.c +++ b/fs/verity/signature.c @@ -88,12 +88,6 @@ int fsverity_verify_signature(const struct fsverity_info *vi, #ifdef CONFIG_SYSCTL static struct ctl_table_header *fsverity_sysctl_header; -static const struct ctl_path fsverity_sysctl_path[] = { - { .procname = "fs", }, - { .procname = "verity", }, - { } -}; - static struct ctl_table fsverity_sysctl_table[] = { { .procname = "require_signatures", @@ -109,8 +103,7 @@ static struct ctl_table fsverity_sysctl_table[] = { static int __init fsverity_sysctl_init(void) { - fsverity_sysctl_header = register_sysctl_paths(fsverity_sysctl_path, - fsverity_sysctl_table); + fsverity_sysctl_header = register_sysctl("fs/verity", fsverity_sysctl_table); if (!fsverity_sysctl_header) { pr_err("sysctl registration failed!\n"); return -ENOMEM; |