diff options
author | Olga Kornievskaia <kolga@netapp.com> | 2021-06-08 22:59:10 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-07-08 21:03:23 +0300 |
commit | 746787489b0c3a879ddc671ce1e0d15e71b0d881 (patch) | |
tree | fa36f3bcf0c9012a5b457c45919ea5908e606069 /net/sunrpc/sysfs.c | |
parent | 009c9aa5be652675a06d5211e1640e02bbb1c33d (diff) | |
download | linux-746787489b0c3a879ddc671ce1e0d15e71b0d881.tar.xz |
sunrpc: Create a sunrpc directory under /sys/kernel/
This is where we'll put per-rpc_client related files
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/sysfs.c')
-rw-r--r-- | net/sunrpc/sysfs.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/sunrpc/sysfs.c b/net/sunrpc/sysfs.c new file mode 100644 index 000000000000..27eda180ac5e --- /dev/null +++ b/net/sunrpc/sysfs.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2020 Anna Schumaker <Anna.Schumaker@Netapp.com> + */ +#include <linux/kobject.h> + +static struct kset *rpc_sunrpc_kset; + +int rpc_sysfs_init(void) +{ + rpc_sunrpc_kset = kset_create_and_add("sunrpc", NULL, kernel_kobj); + if (!rpc_sunrpc_kset) + return -ENOMEM; + return 0; +} + +void rpc_sysfs_exit(void) +{ + kset_unregister(rpc_sunrpc_kset); +} |