aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2010-05-03 17:23:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:31 -0400
commitbe867b194a3ae3c680c29521287ae49b4d44d420 (patch)
tree1b3ad125d02603c6a9cc4bb8ae518695d7c6a66d /lib/kobject.c
parentf349cf34731c3b3eddbcd63cb04489aee2c405bd (diff)
sysfs: Comment sysfs directory tagging logic
Add some in-line comments to explain the new infrastructure, which was introduced to support sysfs directory tagging with namespaces. I think an overall description someplace might be good too, but it didn't really seem to fit into Documentation/filesystems/sysfs.txt, which appears more geared toward users, rather than maintainers, of sysfs. (Tejun, please let me know if I can make anything clearer or failed altogether to comment something that should be commented.) Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index b2c6d1f56e65..f07c57252e82 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -948,6 +948,17 @@ const void *kobj_ns_initial(enum kobj_ns_type type)
948 return ns; 948 return ns;
949} 949}
950 950
951/*
952 * kobj_ns_exit - invalidate a namespace tag
953 *
954 * @type: the namespace type (i.e. KOBJ_NS_TYPE_NET)
955 * @ns: the actual namespace being invalidated
956 *
957 * This is called when a tag is no longer valid. For instance,
958 * when a network namespace exits, it uses this helper to
959 * make sure no sb's sysfs_info points to the now-invalidated
960 * netns.
961 */
951void kobj_ns_exit(enum kobj_ns_type type, const void *ns) 962void kobj_ns_exit(enum kobj_ns_type type, const void *ns)
952{ 963{
953 sysfs_exit_ns(type, ns); 964 sysfs_exit_ns(type, ns);