Re: [PATCH -mm 9/9] netconsole: Support dynamic reconfiguration using configfs
From: Joel Becker <hidden>
Date: 2007-07-07 08:19:43
Also in:
lkml
On Sat, Jul 07, 2007 at 01:18:45PM +0530, Satyam Sharma wrote:
However, for items that are statically initialized (often the group->cg_item members of subsystems or default groups) we often simply set ci_namebuf and then call config_item_init() -- say via config_group_init(), like I've done with the netconsole subsystem in this patch -- but config_item_init() does not set ci_name for such items to ci_namebuf. This means the ci_name member of _initialized_ config_items with their names in ci_namebuf is left un-initialized (NULL, actually, because the subsys / default group would likely be static).
Configfs notices subsystems and default groups and handles this. See configfs_register_subsystem() and create_default_group() in fs/configfs/dir.c
Right. We shouldn't special case (at least not without adding a comment why that would be right) and we never know what might happen to the code at some later day. So let's keep the get() / put() pair.
If you're keeping them, don't do the "empty_item", check the
name.
Otherwise, the changes you describe sound good.
Joel
--
"I have never let my schooling interfere with my education."
- Mark Twain
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127