Lines Matching refs:item

114 	 * item's i_mutex class is already setup, so s_depth is now only
116 * with item's i_mutex locked.
276 * @item: config_itemwe're creating directory for.
283 static int configfs_create_dir(struct config_item *item, struct dentry *dentry,
291 BUG_ON(!item);
297 error = configfs_make_dirent(p->d_fsdata, dentry, item, mode,
316 item->ci_dentry = dentry;
408 * @item: config_item we're removing.
414 * Caller holds the mutex of the item's inode
417 static void configfs_remove_dir(struct config_item * item)
419 struct dentry * dentry = dget(item->ci_dentry);
497 * If it doesn't exist and it isn't a NOT_PINNED item,
577 static void detach_attrs(struct config_item * item)
579 struct dentry * dentry = dget(item->ci_dentry);
606 static int populate_attrs(struct config_item *item)
608 const struct config_item_type *t = item->ci_type;
618 if ((error = configfs_create_file(item, attr)))
624 error = configfs_create_bin_file(item, bin_attr);
631 detach_attrs(item);
637 struct config_item *item,
640 static void configfs_detach_group(struct config_item *item);
751 static void unlink_obj(struct config_item *item)
755 group = item->ci_group;
757 list_del_init(&item->ci_entry);
759 item->ci_group = NULL;
760 item->ci_parent = NULL;
763 config_item_put(item);
770 static void link_obj(struct config_item *parent_item, struct config_item *item)
776 item->ci_parent = parent_item;
782 item->ci_group = config_group_get(to_config_group(parent_item));
783 list_add_tail(&item->ci_entry, &item->ci_group->cg_children);
789 config_item_get(item);
838 struct config_item *item,
844 ret = configfs_create_dir(item, dentry, frag);
846 ret = populate_attrs(item);
854 configfs_remove_dir(item);
865 /* Caller holds the mutex of the item's inode */
866 static void configfs_detach_item(struct config_item *item)
868 detach_attrs(item);
869 configfs_remove_dir(item);
873 struct config_item *item,
880 ret = configfs_attach_item(parent_item, item, dentry, frag);
896 ret = populate_groups(to_config_group(item), frag);
898 configfs_detach_item(item);
912 static void configfs_detach_group(struct config_item *item)
914 detach_groups(to_config_group(item));
915 configfs_detach_item(item);
919 * After the item has been detached from the filesystem view, we are
928 struct config_item *item)
937 item);
942 * This function assumes that reference is held on item
943 * and that item holds a valid reference to the parent. Also, it
947 struct config_item *item)
960 item);
962 config_item_put(item);
1010 * happens, the item cannot go away until the dependent can live without
1012 * possible. When a system asks them to depend on an item, they just
1013 * call configfs_depend_item(). If the item is live and the client
1026 * If we can find the target item in the
1049 * CONFIGFS_USET_CREATING is set, we ignore the item. The actual set of
1103 * We are sure that the item is not about to be removed by rmdir(), and
1200 * After this unlock, we cannot trust the item to stay alive!
1201 * DO NOT REFERENCE item after this unlock.
1253 * As we are trying to depend item from other subsystem
1265 /* Now we can execute core of depend item */
1285 struct config_item *item = NULL;
1330 * The subsystem may belong to a different module than the item
1331 * being created. We don't want to safely pin the new item but
1359 item = &group->cg_item;
1363 item = type->ct_group_ops->make_item(to_config_group(parent_item), name);
1364 if (!item)
1365 item = ERR_PTR(-ENOMEM);
1366 if (!IS_ERR(item))
1367 link_obj(parent_item, item);
1369 ret = PTR_ERR(item);
1387 type = item->ci_type;
1418 ret = configfs_attach_group(parent_item, item, dentry, frag);
1420 ret = configfs_attach_item(parent_item, item, dentry, frag);
1433 client_disconnect_notify(parent_item, item);
1437 unlink_obj(item);
1438 client_drop_item(parent_item, item);
1466 struct config_item *item;
1503 * If no dependent, atomically tag the item as dropping.
1539 item = configfs_get_config_item(dentry);
1541 /* Drop reference from above, item already holds one. */
1544 if (item->ci_type)
1545 dead_item_owner = item->ci_type->ct_owner;
1548 configfs_detach_group(item);
1551 client_disconnect_notify(parent_item, item);
1552 unlink_group(to_config_group(item));
1554 configfs_detach_item(item);
1557 client_disconnect_notify(parent_item, item);
1558 unlink_obj(item);
1561 client_drop_item(parent_item, item);
1565 config_item_put(item);
1834 * @item_type: child item type description