Lines Matching defs:dir

956 static void __get_system_dir(struct trace_subsystem_dir *dir)
958 WARN_ON_ONCE(dir->ref_count == 0);
959 dir->ref_count++;
960 __get_system(dir->subsystem);
963 static void __put_system_dir(struct trace_subsystem_dir *dir)
965 WARN_ON_ONCE(dir->ref_count == 0);
966 /* If the subsystem is about to be freed, the dir must be too */
967 WARN_ON_ONCE(system_refcount(dir->subsystem) == 1 && dir->ref_count != 1);
969 __put_system(dir->subsystem);
970 if (!--dir->ref_count)
971 kfree(dir);
974 static void put_system(struct trace_subsystem_dir *dir)
977 __put_system_dir(dir);
981 static void remove_subsystem(struct trace_subsystem_dir *dir)
983 if (!dir)
986 if (!--dir->nr_events) {
987 eventfs_remove_dir(dir->ei);
988 list_del(&dir->list);
989 __put_system_dir(dir);
1453 struct trace_subsystem_dir *dir = filp->private_data;
1454 struct event_subsystem *system = dir->subsystem;
1457 struct trace_array *tr = dir->tr;
1499 struct trace_subsystem_dir *dir = filp->private_data;
1500 struct event_subsystem *system = dir->subsystem;
1509 ret = tracing_update_buffers(dir->tr);
1523 ret = __ftrace_set_clr_event(dir->tr, NULL, name, NULL, val);
1757 struct trace_subsystem_dir *dir = NULL, *iter_dir;
1773 dir = iter_dir;
1774 if (dir->nr_events) {
1775 __get_system_dir(dir);
1776 system = dir->subsystem;
1791 put_system(dir);
1798 put_system(dir);
1806 struct trace_subsystem_dir *dir;
1810 /* Make a temporary dir that has no system but points to tr */
1811 dir = kzalloc(sizeof(*dir), GFP_KERNEL);
1812 if (!dir)
1817 kfree(dir);
1820 dir->tr = tr;
1821 filp->private_data = dir;
1828 struct trace_subsystem_dir *dir = file->private_data;
1830 trace_array_put(dir->tr);
1833 * If dir->subsystem is NULL, then this is a temporary
1837 if (dir->subsystem)
1838 put_system(dir);
1840 kfree(dir);
1849 struct trace_subsystem_dir *dir = filp->private_data;
1850 struct event_subsystem *system = dir->subsystem;
1876 struct trace_subsystem_dir *dir = filp->private_data;
1887 err = apply_subsystem_event_filter(dir, buf);
2364 struct trace_subsystem_dir *dir;
2378 /* First see if we did not already create this dir */
2379 list_for_each_entry(dir, &tr->systems, list) {
2380 system = dir->subsystem;
2382 dir->nr_events++;
2383 file->system = dir;
2384 return dir->ei;
2397 dir = kmalloc(sizeof(*dir), GFP_KERNEL);
2398 if (!dir)
2414 ei = eventfs_create_dir(name, parent, system_entries, nr_entries, dir);
2421 dir->ei = ei;
2422 dir->tr = tr;
2423 dir->ref_count = 1;
2424 dir->nr_events = 1;
2425 dir->subsystem = system;
2426 file->system = dir;
2428 list_add(&dir->list, &tr->systems);
2430 return dir->ei;
2433 kfree(dir);
2436 if (!dir || !system)
4198 struct trace_subsystem_dir *dir;
4254 list_for_each_entry(dir, &tr->systems, list) {
4256 system = dir->subsystem;