summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 16:25:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 16:25:46 -0700
commit364e8dd9d636fea7def862919aac092b19b7c581 (patch)
treeabc0b5859a8cea40ac2d5fbee47dfabc276036c9 /include
parent48d10bda1f2c69980601a61194015bb0790fb7ab (diff)
parent1ae1602de028acaa42a0f6ff18d19756f8e825c6 (diff)
Merge tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs
Pull configfs updates from Christoph Hellwig: - A large patch from me to simplify setting up the list of default groups by actually implementing it as a list instead of an array. - a small Y2083 prep patch from Deepa Dinamani. Probably doesn't matter on it's own, but it seems like he is trying to get rid of all CURRENT_TIME uses in file systems, which is a worthwhile goal. * tag 'configfs-for-linus' of git://git.infradead.org/users/hch/configfs: configfs: switch ->default groups to a linked list configfs: Replace CURRENT_TIME by current_fs_time()
Diffstat (limited to 'include')
-rw-r--r--include/linux/configfs.h11
-rw-r--r--include/target/target_core_base.h3
2 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index f8165c129ccb..485fe5519448 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -96,7 +96,8 @@ struct config_group {
struct config_item cg_item;
struct list_head cg_children;
struct configfs_subsystem *cg_subsys;
- struct config_group **default_groups;
+ struct list_head default_groups;
+ struct list_head group_entry;
};
extern void config_group_init(struct config_group *group);
@@ -123,6 +124,12 @@ extern struct config_item *config_group_find_item(struct config_group *,
const char *);
+static inline void configfs_add_default_group(struct config_group *new_group,
+ struct config_group *group)
+{
+ list_add_tail(&new_group->group_entry, &group->default_groups);
+}
+
struct configfs_attribute {
const char *ca_name;
struct module *ca_owner;
@@ -251,6 +258,8 @@ int configfs_register_group(struct config_group *parent_group,
struct config_group *group);
void configfs_unregister_group(struct config_group *group);
+void configfs_remove_default_groups(struct config_group *group);
+
struct config_group *
configfs_register_default_group(struct config_group *parent_group,
const char *name,
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index e8c8c08bf575..1b09cac06508 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -560,7 +560,6 @@ struct se_node_acl {
struct config_group acl_auth_group;
struct config_group acl_param_group;
struct config_group acl_fabric_stat_group;
- struct config_group *acl_default_groups[5];
struct list_head acl_list;
struct list_head acl_sess_list;
struct completion acl_free_comp;
@@ -887,7 +886,6 @@ struct se_portal_group {
const struct target_core_fabric_ops *se_tpg_tfo;
struct se_wwn *se_tpg_wwn;
struct config_group tpg_group;
- struct config_group *tpg_default_groups[7];
struct config_group tpg_lun_group;
struct config_group tpg_np_group;
struct config_group tpg_acl_group;
@@ -923,7 +921,6 @@ static inline struct se_portal_group *param_to_tpg(struct config_item *item)
struct se_wwn {
struct target_fabric_configfs *wwn_tf;
struct config_group wwn_group;
- struct config_group *wwn_default_groups[2];
struct config_group fabric_stat_group;
};