Skip to content

Commit 1238c8b

Browse files
mcgrofebiggers
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
1 parent 8b7d3fe commit 1238c8b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

fs/verity/signature.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ int fsverity_verify_signature(const struct fsverity_info *vi,
8888
#ifdef CONFIG_SYSCTL
8989
static struct ctl_table_header *fsverity_sysctl_header;
9090

91-
static const struct ctl_path fsverity_sysctl_path[] = {
92-
{ .procname = "fs", },
93-
{ .procname = "verity", },
94-
{ }
95-
};
96-
9791
static struct ctl_table fsverity_sysctl_table[] = {
9892
{
9993
.procname = "require_signatures",
@@ -109,8 +103,7 @@ static struct ctl_table fsverity_sysctl_table[] = {
109103

110104
static int __init fsverity_sysctl_init(void)
111105
{
112-
fsverity_sysctl_header = register_sysctl_paths(fsverity_sysctl_path,
113-
fsverity_sysctl_table);
106+
fsverity_sysctl_header = register_sysctl("fs/verity", fsverity_sysctl_table);
114107
if (!fsverity_sysctl_header) {
115108
pr_err("sysctl registration failed!\n");
116109
return -ENOMEM;

0 commit comments

Comments
 (0)