summaryrefslogtreecommitdiffstats
path: root/fs/configfs/item.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-02-26 11:02:14 +0100
committerChristoph Hellwig <hch@lst.de>2016-03-06 16:11:24 +0100
commit1ae1602de028acaa42a0f6ff18d19756f8e825c6 (patch)
tree3370e5c29945370f62b9c72adeec587ed102d048 /fs/configfs/item.c
parentb1f1a29d8fb5eeaeec2cafe4c62f276d950c015b (diff)
downloadlinux-1ae1602de028acaa42a0f6ff18d19756f8e825c6.tar.bz2
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 <hch@lst.de> Acked-by: Felipe Balbi <balbi@kernel.org> [drivers/usb/gadget] Acked-by: Joel Becker <jlbec@evilplan.org> Acked-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Diffstat (limited to 'fs/configfs/item.c')
-rw-r--r--fs/configfs/item.c1
1 files changed, 1 insertions, 0 deletions
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);