summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/kernfs/dir.c2
-rw-r--r--fs/kernfs/kernfs-internal.h1
-rw-r--r--fs/kernfs/mount.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index a0f99b7f84b2..8245d3b34894 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -500,7 +500,7 @@ const struct dentry_operations kernfs_dops = {
*/
struct kernfs_node *kernfs_node_from_dentry(struct dentry *dentry)
{
- if (dentry->d_op == &kernfs_dops)
+ if (dentry->d_sb->s_op == &kernfs_sops)
return dentry->d_fsdata;
return NULL;
}
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index a91d7a1113d9..8be13b2a079b 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -65,6 +65,7 @@ struct kernfs_super_info {
};
#define kernfs_info(SB) ((struct kernfs_super_info *)(SB->s_fs_info))
+extern const struct super_operations kernfs_sops;
extern struct kmem_cache *kernfs_node_cache;
/*
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index e5b28b0ebc37..405279b5517b 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -39,7 +39,7 @@ static int kernfs_sop_show_options(struct seq_file *sf, struct dentry *dentry)
return 0;
}
-static const struct super_operations kernfs_sops = {
+const struct super_operations kernfs_sops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.evict_inode = kernfs_evict_inode,