selinux: Make selinux_kernfs_init_security static
authorYueHaibing <yuehaibing@huawei.com>
Fri, 22 Mar 2019 14:04:00 +0000 (22:04 +0800)
committerPaul Moore <paul@paul-moore.com>
Fri, 22 Mar 2019 19:59:30 +0000 (15:59 -0400)
Fix sparse warning:

security/selinux/hooks.c:3389:5: warning:
 symbol 'selinux_kernfs_init_security' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c

index ab4b049daf177f632192dd7b6411fe8da6998907..b6e61524d68d25ce65a5f96ca4c5ed0f78b548f4 100644 (file)
@@ -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;