From 1ae1602de028acaa42a0f6ff18d19756f8e825c6 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 26 Feb 2016 11:02:14 +0100 Subject: configfs: switch ->default groups to a linked list Replace the current NULL-terminated array of default groups with a linked list. This gets rid of lots of nasty code to size and/or dynamically allocate the array. While we're at it also provide a conveniant helper to remove the default groups. Signed-off-by: Christoph Hellwig Acked-by: Felipe Balbi [drivers/usb/gadget] Acked-by: Joel Becker Acked-by: Nicholas Bellinger Reviewed-by: Sagi Grimberg --- fs/configfs/item.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/configfs/item.c') diff --git a/fs/configfs/item.c b/fs/configfs/item.c index b863a09cd2f1..8b2a994042dd 100644 --- a/fs/configfs/item.c +++ b/fs/configfs/item.c @@ -182,6 +182,7 @@ void config_group_init(struct config_group *group) { config_item_init(&group->cg_item); INIT_LIST_HEAD(&group->cg_children); + INIT_LIST_HEAD(&group->default_groups); } EXPORT_SYMBOL(config_group_init); -- cgit v1.2.3-70-g09d2