Skip to content

Commit ee9c693

Browse files
Dr. David Alan Gilbertgregkh
authored andcommitted
kobject: Remove unused functions
kobj_ns_initial() and kobj_ns_netlink() were adde din 2010 by commit bc451f2 ("kobj: Add basic infrastructure for dealing with namespaces.") but have remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent dd19f41 commit ee9c693

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

include/linux/kobject_ns.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ const struct kobj_ns_type_operations *kobj_ns_ops(const struct kobject *kobj);
5252

5353
bool kobj_ns_current_may_mount(enum kobj_ns_type type);
5454
void *kobj_ns_grab_current(enum kobj_ns_type type);
55-
const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk);
56-
const void *kobj_ns_initial(enum kobj_ns_type type);
5755
void kobj_ns_drop(enum kobj_ns_type type, void *ns);
5856

5957
#endif /* _LINUX_KOBJECT_NS_H */

lib/kobject.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,30 +1096,6 @@ void *kobj_ns_grab_current(enum kobj_ns_type type)
10961096
}
10971097
EXPORT_SYMBOL_GPL(kobj_ns_grab_current);
10981098

1099-
const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk)
1100-
{
1101-
const void *ns = NULL;
1102-
1103-
spin_lock(&kobj_ns_type_lock);
1104-
if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type])
1105-
ns = kobj_ns_ops_tbl[type]->netlink_ns(sk);
1106-
spin_unlock(&kobj_ns_type_lock);
1107-
1108-
return ns;
1109-
}
1110-
1111-
const void *kobj_ns_initial(enum kobj_ns_type type)
1112-
{
1113-
const void *ns = NULL;
1114-
1115-
spin_lock(&kobj_ns_type_lock);
1116-
if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type])
1117-
ns = kobj_ns_ops_tbl[type]->initial_ns();
1118-
spin_unlock(&kobj_ns_type_lock);
1119-
1120-
return ns;
1121-
}
1122-
11231099
void kobj_ns_drop(enum kobj_ns_type type, void *ns)
11241100
{
11251101
spin_lock(&kobj_ns_type_lock);

0 commit comments

Comments
 (0)