summaryrefslogtreecommitdiff
path: root/net/sunrpc/sysfs.c
diff options
context:
space:
mode:
authorOlga Kornievskaia <kolga@netapp.com>2021-06-08 22:59:10 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-07-08 21:03:23 +0300
commit746787489b0c3a879ddc671ce1e0d15e71b0d881 (patch)
treefa36f3bcf0c9012a5b457c45919ea5908e606069 /net/sunrpc/sysfs.c
parent009c9aa5be652675a06d5211e1640e02bbb1c33d (diff)
downloadlinux-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.c20
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);
+}