Lines Matching defs:item
112 * item's i_mutex class is already setup, so s_depth is now only
114 * with item's i_mutex locked.
274 * @item: config_itemwe're creating directory for.
282 static int configfs_create_dir(struct config_item *item, struct dentry *dentry,
290 BUG_ON(!item);
296 error = configfs_make_dirent(p->d_fsdata, dentry, item, mode,
315 item->ci_dentry = dentry;
407 * @item: config_item we're removing.
413 * Caller holds the mutex of the item's inode
416 static void configfs_remove_dir(struct config_item * item)
418 struct dentry * dentry = dget(item->ci_dentry);
551 static void detach_attrs(struct config_item * item)
553 struct dentry * dentry = dget(item->ci_dentry);
580 static int populate_attrs(struct config_item *item)
582 const struct config_item_type *t = item->ci_type;
592 if ((error = configfs_create_file(item, attr)))
598 error = configfs_create_bin_file(item, bin_attr);
605 detach_attrs(item);
611 struct config_item *item,
614 static void configfs_detach_group(struct config_item *item);
725 static void unlink_obj(struct config_item *item)
729 group = item->ci_group;
731 list_del_init(&item->ci_entry);
733 item->ci_group = NULL;
734 item->ci_parent = NULL;
737 config_item_put(item);
744 static void link_obj(struct config_item *parent_item, struct config_item *item)
750 item->ci_parent = parent_item;
756 item->ci_group = config_group_get(to_config_group(parent_item));
757 list_add_tail(&item->ci_entry, &item->ci_group->cg_children);
763 config_item_get(item);
812 struct config_item *item,
818 ret = configfs_create_dir(item, dentry, frag);
820 ret = populate_attrs(item);
828 configfs_remove_dir(item);
839 /* Caller holds the mutex of the item's inode */
840 static void configfs_detach_item(struct config_item *item)
842 detach_attrs(item);
843 configfs_remove_dir(item);
847 struct config_item *item,
854 ret = configfs_attach_item(parent_item, item, dentry, frag);
870 ret = populate_groups(to_config_group(item), frag);
872 configfs_detach_item(item);
886 static void configfs_detach_group(struct config_item *item)
888 detach_groups(to_config_group(item));
889 configfs_detach_item(item);
893 * After the item has been detached from the filesystem view, we are
902 struct config_item *item)
911 item);
916 * This function assumes that reference is held on item
917 * and that item holds a valid reference to the parent. Also, it
921 struct config_item *item)
934 item);
936 config_item_put(item);
984 * happens, the item cannot go away until the dependent can live without
986 * possible. When a system asks them to depend on an item, they just
987 * call configfs_depend_item(). If the item is live and the client
1000 * If we can find the target item in the
1023 * CONFIGFS_USET_CREATING is set, we ignore the item. The actual set of
1077 * We are sure that the item is not about to be removed by rmdir(), and
1174 * After this unlock, we cannot trust the item to stay alive!
1175 * DO NOT REFERENCE item after this unlock.
1227 * As we are trying to depend item from other subsystem
1239 /* Now we can execute core of depend item */
1260 struct config_item *item = NULL;
1305 * The subsystem may belong to a different module than the item
1306 * being created. We don't want to safely pin the new item but
1334 item = &group->cg_item;
1338 item = type->ct_group_ops->make_item(to_config_group(parent_item), name);
1339 if (!item)
1340 item = ERR_PTR(-ENOMEM);
1341 if (!IS_ERR(item))
1342 link_obj(parent_item, item);
1344 ret = PTR_ERR(item);
1362 type = item->ci_type;
1393 ret = configfs_attach_group(parent_item, item, dentry, frag);
1395 ret = configfs_attach_item(parent_item, item, dentry, frag);
1408 client_disconnect_notify(parent_item, item);
1412 unlink_obj(item);
1413 client_drop_item(parent_item, item);
1441 struct config_item *item;
1478 * If no dependent, atomically tag the item as dropping.
1514 item = configfs_get_config_item(dentry);
1516 /* Drop reference from above, item already holds one. */
1519 if (item->ci_type)
1520 dead_item_owner = item->ci_type->ct_owner;
1523 configfs_detach_group(item);
1526 client_disconnect_notify(parent_item, item);
1527 unlink_group(to_config_group(item));
1529 configfs_detach_item(item);
1532 client_disconnect_notify(parent_item, item);
1533 unlink_obj(item);
1536 client_drop_item(parent_item, item);
1540 config_item_put(item);
1804 * @item_type: child item type description