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: [email protected]
Phone: (650) 506-8127
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]