aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 20:44:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 20:44:21 -0400
commit501b7c77de3e90519e95fd99e923bf9a29cd120d (patch)
treef7dc56286e7309186f335d32f03434e82f31a41d /Documentation
parent74e651f0aa100f3e5d3432a8dd8869c089e8d72f (diff)
parent184d7d20d352c7374f70ebca7468dc8cd5cc618a (diff)
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')
-rw-r--r--Documentation/filesystems/configfs/configfs_example.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/Documentation/filesystems/configfs/configfs_example.c b/Documentation/filesystems/configfs/configfs_example.c
index 3d4713a6c207..2d6a14a463e0 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 = {
264}; 264};
265 265
266 266
267struct simple_children {
268 struct config_group group;
269};
270
271static inline struct simple_children *to_simple_children(struct config_item *item)
272{
273 return item ? container_of(to_config_group(item), struct simple_children, group) : NULL;
274}
275
267static struct config_item *simple_children_make_item(struct config_group *group, const char *name) 276static struct config_item *simple_children_make_item(struct config_group *group, const char *name)
268{ 277{
269 struct simple_child *simple_child; 278 struct simple_child *simple_child;
@@ -304,7 +313,13 @@ static ssize_t simple_children_attr_show(struct config_item *item,
304"items have only one attribute that is readable and writeable.\n"); 313"items have only one attribute that is readable and writeable.\n");
305} 314}
306 315
316static void simple_children_release(struct config_item *item)
317{
318 kfree(to_simple_children(item));
319}
320
307static struct configfs_item_operations simple_children_item_ops = { 321static struct configfs_item_operations simple_children_item_ops = {
322 .release = simple_children_release,
308 .show_attribute = simple_children_attr_show, 323 .show_attribute = simple_children_attr_show,
309}; 324};
310 325
@@ -345,10 +360,6 @@ static struct configfs_subsystem simple_children_subsys = {
345 * children of its own. 360 * children of its own.
346 */ 361 */
347 362
348struct simple_children {
349 struct config_group group;
350};
351
352static struct config_group *group_children_make_group(struct config_group *group, const char *name) 363static struct config_group *group_children_make_group(struct config_group *group, const char *name)
353{ 364{
354 struct simple_children *simple_children; 365 struct simple_children *simple_children;