• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/fs/configfs/

Lines Matching defs:item

120 	 * item's i_mutex class is already setup, so s_depth is now only
122 * with item's i_mutex locked.
298 * @item: config_itemwe're creating directory for.
305 static int configfs_create_dir(struct config_item * item, struct dentry *dentry)
310 BUG_ON(!item);
312 if (item->ci_parent)
313 parent = item->ci_parent->ci_dentry;
319 error = create_dir(item,parent,dentry);
321 item->ci_dentry = dentry;
410 * @item: config_item we're removing.
416 * Caller holds the mutex of the item's inode
419 static void configfs_remove_dir(struct config_item * item)
421 struct dentry * dentry = dget(item->ci_dentry);
493 * If it doesn't exist and it isn't a NOT_PINNED item,
570 static void detach_attrs(struct config_item * item)
572 struct dentry * dentry = dget(item->ci_dentry);
599 static int populate_attrs(struct config_item *item)
601 struct config_item_type *t = item->ci_type;
610 if ((error = configfs_create_file(item, attr)))
616 detach_attrs(item);
622 struct config_item *item,
624 static void configfs_detach_group(struct config_item *item);
730 static void unlink_obj(struct config_item *item)
734 group = item->ci_group;
736 list_del_init(&item->ci_entry);
738 item->ci_group = NULL;
739 item->ci_parent = NULL;
742 config_item_put(item);
749 static void link_obj(struct config_item *parent_item, struct config_item *item)
755 item->ci_parent = parent_item;
761 item->ci_group = config_group_get(to_config_group(parent_item));
762 list_add_tail(&item->ci_entry, &item->ci_group->cg_children);
768 config_item_get(item);
827 struct config_item *item,
832 ret = configfs_create_dir(item, dentry);
834 ret = populate_attrs(item);
842 configfs_remove_dir(item);
853 /* Caller holds the mutex of the item's inode */
854 static void configfs_detach_item(struct config_item *item)
856 detach_attrs(item);
857 configfs_remove_dir(item);
861 struct config_item *item,
867 ret = configfs_attach_item(parent_item, item, dentry);
883 ret = populate_groups(to_config_group(item));
885 configfs_detach_item(item);
899 static void configfs_detach_group(struct config_item *item)
901 detach_groups(to_config_group(item));
902 configfs_detach_item(item);
906 * After the item has been detached from the filesystem view, we are
915 struct config_item *item)
924 item);
929 * This function assumes that reference is held on item
930 * and that item holds a valid reference to the parent. Also, it
934 struct config_item *item)
947 item);
949 config_item_put(item);
997 * happens, the item cannot go away until the dependant can live without
999 * possible. When a system asks them to depend on an item, they just
1000 * call configfs_depend_item(). If the item is live and the client
1013 * If we can find the target item in the
1036 * CONFIGFS_USET_CREATING is set, we ignore the item. The actual set of
1123 * We are sure that the item is not about to be removed by rmdir(), and
1166 * After this unlock, we cannot trust the item to stay alive!
1167 * DO NOT REFERENCE item after this unlock.
1178 struct config_item *item = NULL;
1221 * The subsystem may belong to a different module than the item
1222 * being created. We don't want to safely pin the new item but
1250 item = &group->cg_item;
1254 item = type->ct_group_ops->make_item(to_config_group(parent_item), name);
1255 if (!item)
1256 item = ERR_PTR(-ENOMEM);
1257 if (!IS_ERR(item))
1258 link_obj(parent_item, item);
1260 ret = PTR_ERR(item);
1278 type = item->ci_type;
1309 ret = configfs_attach_group(parent_item, item, dentry);
1311 ret = configfs_attach_item(parent_item, item, dentry);
1324 client_disconnect_notify(parent_item, item);
1328 unlink_obj(item);
1329 client_drop_item(parent_item, item);
1356 struct config_item *item;
1395 * If no dependent, atomically tag the item as dropping.
1419 item = configfs_get_config_item(dentry);
1421 /* Drop reference from above, item already holds one. */
1424 if (item->ci_type)
1425 dead_item_owner = item->ci_type->ct_owner;
1428 configfs_detach_group(item);
1431 client_disconnect_notify(parent_item, item);
1432 unlink_group(to_config_group(item));
1434 configfs_detach_item(item);
1437 client_disconnect_notify(parent_item, item);
1438 unlink_obj(item);
1441 client_drop_item(parent_item, item);
1445 config_item_put(item);