summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/kernfs-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
-rw-r--r--fs/kernfs/kernfs-internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index b7ea76c6fb33..2dbb1cb95e7f 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -39,9 +39,9 @@ struct sysfs_inode_attrs {
static inline struct kernfs_root *kernfs_root(struct kernfs_node *kn)
{
/* if parent exists, it's always a dir; otherwise, @sd is a dir */
- if (kn->s_parent)
- kn = kn->s_parent;
- return kn->s_dir.root;
+ if (kn->parent)
+ kn = kn->parent;
+ return kn->dir.root;
}
/*
OpenPOWER on IntegriCloud