Skip to content

Commit

Permalink
NFS: rename nfs_client_kobj to nfs_net_kobj
Browse files Browse the repository at this point in the history
Match the variable names to the sysfs structure.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Benjamin Coddington authored and Trond Myklebust committed Jun 19, 2023
1 parent 8b18a2e commit d5082ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions fs/nfs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "netns.h"
#include "sysfs.h"

struct kobject *nfs_client_kobj;
struct kobject *nfs_net_kobj;
static struct kset *nfs_kset;

static void nfs_netns_object_release(struct kobject *kobj)
Expand Down Expand Up @@ -58,8 +58,8 @@ int nfs_sysfs_init(void)
nfs_kset = kset_create_and_add("nfs", NULL, fs_kobj);
if (!nfs_kset)
return -ENOMEM;
nfs_client_kobj = nfs_netns_object_alloc("net", nfs_kset, NULL);
if (!nfs_client_kobj) {
nfs_net_kobj = nfs_netns_object_alloc("net", nfs_kset, NULL);
if (!nfs_net_kobj) {
kset_unregister(nfs_kset);
nfs_kset = NULL;
return -ENOMEM;
Expand All @@ -69,7 +69,7 @@ int nfs_sysfs_init(void)

void nfs_sysfs_exit(void)
{
kobject_put(nfs_client_kobj);
kobject_put(nfs_net_kobj);
kset_unregister(nfs_kset);
}

Expand Down Expand Up @@ -172,7 +172,7 @@ void nfs_netns_sysfs_setup(struct nfs_net *netns, struct net *net)
{
struct nfs_netns_client *clp;

clp = nfs_netns_client_alloc(nfs_client_kobj, net);
clp = nfs_netns_client_alloc(nfs_net_kobj, net);
if (clp) {
netns->nfs_client = clp;
kobject_uevent(&clp->kobject, KOBJ_ADD);
Expand Down
2 changes: 1 addition & 1 deletion fs/nfs/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct nfs_netns_client {
const char __rcu *identifier;
};

extern struct kobject *nfs_client_kobj;
extern struct kobject *nfs_net_kobj;

extern int nfs_sysfs_init(void);
extern void nfs_sysfs_exit(void);
Expand Down

0 comments on commit d5082ac

Please sign in to comment.