diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-06-17 15:34:32 -0700 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-07-31 16:21:13 -0700 |
commit | 70526b67443a980d5029d9cf06903bef731a4e96 (patch) | |
tree | af4558619eeeda7f0075017881d8274d03854ca9 /Documentation/filesystems/configfs | |
parent | 99cefda42ac550863b5ae1df9e60322e377decf9 (diff) |
[PATCH] configfs: Pin configfs subsystems separately from new config_items.
configfs_mkdir() creates a new item by calling its parent's
->make_item/group() functions. Once that object is created,
configfs_mkdir() calls try_module_get() on the new item's module. If it
succeeds, the module owning the new item cannot be unloaded, and
configfs is safe to reference the item.
If the item and the subsystem it belongs to are part of the same module,
the subsystem is also pinned. This is the common case.
However, if the subsystem is made up of multiple modules, this may not
pin the subsystem. Thus, it would be possible to unload the toplevel
subsystem module while there is still a child item. Thus, we now
try_module_get() the subsystem's module. This only really affects
children of the toplevel subsystem group. Deeper children already have
their parents pinned.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'Documentation/filesystems/configfs')
0 files changed, 0 insertions, 0 deletions