diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index ab4b049daf177f632192dd7b6411fe8da6998907..b6e61524d68d25ce65a5f96ca4c5ed0f78b548f4 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -3386,8 +3386,8 @@ static int selinux_inode_copy_up_xattr(const char *name)
 
 /* kernfs node operations */
 
-int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
-				 struct kernfs_node *kn)
+static int selinux_kernfs_init_security(struct kernfs_node *kn_dir,
+					struct kernfs_node *kn)
 {
 	const struct task_security_struct *tsec = current_security();
 	u32 parent_sid, newsid, clen;