diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 17:44:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 17:44:21 -0700 |
commit | 501b7c77de3e90519e95fd99e923bf9a29cd120d (patch) | |
tree | f7dc56286e7309186f335d32f03434e82f31a41d /Documentation/filesystems | |
parent | 74e651f0aa100f3e5d3432a8dd8869c089e8d72f (diff) | |
parent | 184d7d20d352c7374f70ebca7468dc8cd5cc618a (diff) | |
download | linux-3.10-501b7c77de3e90519e95fd99e923bf9a29cd120d.tar.gz linux-3.10-501b7c77de3e90519e95fd99e923bf9a29cd120d.tar.bz2 linux-3.10-501b7c77de3e90519e95fd99e923bf9a29cd120d.zip |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
ocfs2: remove redundant NULL checks in ocfs2_direct_IO_get_blocks()
ocfs2: clean up some osb fields
ocfs2: fix init of uuid_net_key
ocfs2: silence a debug print
ocfs2: silence ENOENT during lookup of broken links
ocfs2: Cleanup message prints
ocfs2: silence -EEXIST from ocfs2_extent_map_insert/lookup
[PATCH] fs/ocfs2/dlm/dlmrecovery.c: make dlm_lockres_master_requery() static
ocfs2: warn the user on a dead timeout mismatch
ocfs2: OCFS2_FS must depend on SYSFS
ocfs2: Compile-time disabling of ocfs2 debugging output.
configfs: Clear up a few extra spaces where there should be TABs.
configfs: Release memory in configfs_example.
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/configfs/configfs_example.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Documentation/filesystems/configfs/configfs_example.c b/Documentation/filesystems/configfs/configfs_example.c index 3d4713a6c20..2d6a14a463e 100644 --- a/Documentation/filesystems/configfs/configfs_example.c +++ b/Documentation/filesystems/configfs/configfs_example.c @@ -264,6 +264,15 @@ static struct config_item_type simple_child_type = { }; +struct simple_children { + struct config_group group; +}; + +static inline struct simple_children *to_simple_children(struct config_item *item) +{ + return item ? container_of(to_config_group(item), struct simple_children, group) : NULL; +} + static struct config_item *simple_children_make_item(struct config_group *group, const char *name) { struct simple_child *simple_child; @@ -304,7 +313,13 @@ static ssize_t simple_children_attr_show(struct config_item *item, "items have only one attribute that is readable and writeable.\n"); } +static void simple_children_release(struct config_item *item) +{ + kfree(to_simple_children(item)); +} + static struct configfs_item_operations simple_children_item_ops = { + .release = simple_children_release, .show_attribute = simple_children_attr_show, }; @@ -345,10 +360,6 @@ static struct configfs_subsystem simple_children_subsys = { * children of its own. */ -struct simple_children { - struct config_group group; -}; - static struct config_group *group_children_make_group(struct config_group *group, const char *name) { struct simple_children *simple_children; |