Home
last modified time | relevance | path

Searched refs:kobj (Results 1 – 19 of 19) sorted by relevance

/fs/sysfs/
Dgroup.c19 static void remove_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, in remove_files() argument
29 static int create_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, in create_files() argument
44 mode = grp->is_visible(kobj, *attr, i); in create_files()
54 remove_files(dir_sd, kobj, grp); in create_files()
59 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group() argument
65 BUG_ON(!kobj || (!update && !kobj->sd)); in internal_create_group()
68 if (unlikely(update && !kobj->sd)) in internal_create_group()
72 error = sysfs_create_subdir(kobj, grp->name, &sd); in internal_create_group()
76 sd = kobj->sd; in internal_create_group()
78 error = create_files(sd, kobj, grp, update); in internal_create_group()
[all …]
Dfile.c77 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in fill_read_buffer() local
92 count = ops->show(kobj, attr_sd->s_attr.attr, buffer->page); in fill_read_buffer()
201 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in flush_write_buffer() local
209 rc = ops->store(kobj, attr_sd->s_attr.attr, buffer->page, count); in flush_write_buffer()
335 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in sysfs_open_file() local
350 if (kobj->ktype && kobj->ktype->sysfs_ops) in sysfs_open_file()
351 ops = kobj->ktype->sysfs_ops; in sysfs_open_file()
354 "kobject: %s\n", kobject_name(kobj)); in sysfs_open_file()
535 int sysfs_create_file(struct kobject * kobj, const struct attribute * attr) in sysfs_create_file() argument
537 BUG_ON(!kobj || !kobj->sd || !attr); in sysfs_create_file()
[all …]
Dbin.c40 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in fill_read() local
49 rc = attr->read(kobj, attr, buffer, off, count); in fill_read()
111 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in flush_write() local
120 rc = attr->write(kobj, attr, buffer, offset, count); in flush_write()
176 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in mmap() local
187 rc = attr->mmap(kobj, attr, vma); in mmap()
265 int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) in sysfs_create_bin_file() argument
267 BUG_ON(!kobj || !kobj->sd || !attr); in sysfs_create_bin_file()
269 return sysfs_add_file(kobj->sd, &attr->attr, SYSFS_KOBJ_BIN_ATTR); in sysfs_create_bin_file()
279 void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) in sysfs_remove_bin_file() argument
[all …]
Dsymlink.c22 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link() argument
33 if (!kobj) in sysfs_do_create_link()
36 parent_sd = kobj->sd; in sysfs_do_create_link()
86 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link() argument
89 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link()
101 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn() argument
104 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn()
113 void sysfs_remove_link(struct kobject * kobj, const char * name) in sysfs_remove_link() argument
117 if (!kobj) in sysfs_remove_link()
120 parent_sd = kobj->sd; in sysfs_remove_link()
Ddir.c640 static int create_dir(struct kobject *kobj, struct sysfs_dirent *parent_sd, in create_dir() argument
652 sd->s_dir.kobj = kobj; in create_dir()
667 int sysfs_create_subdir(struct kobject *kobj, const char *name, in sysfs_create_subdir() argument
670 return create_dir(kobj, kobj->sd, name, p_sd); in sysfs_create_subdir()
677 int sysfs_create_dir(struct kobject * kobj) in sysfs_create_dir() argument
682 BUG_ON(!kobj); in sysfs_create_dir()
684 if (kobj->parent) in sysfs_create_dir()
685 parent_sd = kobj->parent->sd; in sysfs_create_dir()
689 error = create_dir(kobj, parent_sd, kobject_name(kobj), &sd); in sysfs_create_dir()
691 kobj->sd = sd; in sysfs_create_dir()
[all …]
Dsysfs.h15 struct kobject *kobj; member
123 int sysfs_create_subdir(struct kobject *kobj, const char *name,
/fs/
Dchar_dev.c280 kobject_set_name(&cdev->kobj, "%s", name); in register_chrdev()
281 for (s = strchr(kobject_name(&cdev->kobj),'/'); s; s = strchr(s, '/')) in register_chrdev()
292 kobject_put(&cdev->kobj); in register_chrdev()
334 struct kobject *kobj; in cdev_get() local
338 kobj = kobject_get(&p->kobj); in cdev_get()
339 if (!kobj) in cdev_get()
341 return kobj; in cdev_get()
348 kobject_put(&p->kobj); in cdev_put()
365 struct kobject *kobj; in chrdev_open() local
368 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); in chrdev_open()
[all …]
Dblock_dev.c594 bo->sdev = kobject_get(&part_to_dev(bdev->bd_part)->kobj); in bd_holder_grab_dirs()
623 static struct bd_holder *alloc_bd_holder(struct kobject *kobj) in alloc_bd_holder() argument
632 bo->sdir = kobj; in alloc_bd_holder()
717 struct kobject *kobj) in del_bd_holder() argument
722 if (bo->sdir == kobj) { in del_bd_holder()
754 struct kobject *kobj) in bd_claim_by_kobject() argument
759 if (!kobj) in bd_claim_by_kobject()
762 bo = alloc_bd_holder(kobj); in bd_claim_by_kobject()
796 struct kobject *kobj) in bd_release_from_kobject() argument
798 if (!kobj) in bd_release_from_kobject()
[all …]
/fs/gfs2/locking/dlm/
Dsysfs.c151 static ssize_t gdlm_attr_show(struct kobject *kobj, struct attribute *attr, in gdlm_attr_show() argument
154 struct gdlm_ls *ls = container_of(kobj, struct gdlm_ls, kobj); in gdlm_attr_show()
159 static ssize_t gdlm_attr_store(struct kobject *kobj, struct attribute *attr, in gdlm_attr_store() argument
162 struct gdlm_ls *ls = container_of(kobj, struct gdlm_ls, kobj); in gdlm_attr_store()
183 ls->kobj.kset = gdlm_kset; in gdlm_kobject_setup()
184 error = kobject_init_and_add(&ls->kobj, &gdlm_ktype, fskobj, in gdlm_kobject_setup()
188 kobject_uevent(&ls->kobj, KOBJ_ADD); in gdlm_kobject_setup()
195 kobject_put(&ls->kobj); in gdlm_kobject_release()
198 static int gdlm_uevent(struct kset *kset, struct kobject *kobj, in gdlm_uevent() argument
201 struct gdlm_ls *ls = container_of(kobj, struct gdlm_ls, kobj); in gdlm_uevent()
Dmount.c206 kobject_uevent_env(&ls->kobj, KOBJ_CHANGE, envp); in gdlm_recovery_done()
215 kobject_uevent_env(&ls->kobj, KOBJ_CHANGE, envp); in gdlm_others_may_mount()
226 kobject_uevent(&ls->kobj, KOBJ_OFFLINE); in gdlm_withdraw()
Dlock_dlm.h64 struct kobject kobj; member
/fs/btrfs/
Dsysfs.c104 static ssize_t btrfs_super_attr_show(struct kobject *kobj, in btrfs_super_attr_show() argument
107 struct btrfs_fs_info *fs = container_of(kobj, struct btrfs_fs_info, in btrfs_super_attr_show()
116 static ssize_t btrfs_super_attr_store(struct kobject *kobj, in btrfs_super_attr_store() argument
120 struct btrfs_fs_info *fs = container_of(kobj, struct btrfs_fs_info, in btrfs_super_attr_store()
129 static ssize_t btrfs_root_attr_show(struct kobject *kobj, in btrfs_root_attr_show() argument
132 struct btrfs_root *root = container_of(kobj, struct btrfs_root, in btrfs_root_attr_show()
141 static ssize_t btrfs_root_attr_store(struct kobject *kobj, in btrfs_root_attr_store() argument
145 struct btrfs_root *root = container_of(kobj, struct btrfs_root, in btrfs_root_attr_store()
153 static void btrfs_super_release(struct kobject *kobj) in btrfs_super_release() argument
155 struct btrfs_fs_info *fs = container_of(kobj, struct btrfs_fs_info, in btrfs_super_release()
[all …]
/fs/ocfs2/cluster/
Dsys.c38 static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, in version_show() argument
76 ret = sysfs_create_link(NULL, &o2cb_kset->kobj, "o2cb"); in o2cb_sys_init()
80 ret = sysfs_create_group(&o2cb_kset->kobj, &o2cb_attr_group); in o2cb_sys_init()
Dmasklog.c148 .kobj = {.ktype = &mlog_ktype},
161 kobject_set_name(&mlog_kset.kobj, "logmask"); in mlog_sys_init()
162 mlog_kset.kobj.kset = o2cb_kset; in mlog_sys_init()
/fs/partitions/
Dcheck.c419 p->holder_dir = kobject_create_and_add("holders", &pdev->kobj); in add_partition()
436 kobject_uevent(&pdev->kobj, KOBJ_ADD); in add_partition()
473 err = sysfs_create_link(block_depr, &ddev->kobj, in register_disk()
474 kobject_name(&ddev->kobj)); in register_disk()
480 disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj); in register_disk()
481 disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj); in register_disk()
504 kobject_uevent(&ddev->kobj, KOBJ_ADD); in register_disk()
509 kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD); in register_disk()
541 kobject_uevent(&disk_to_dev(disk)->kobj, KOBJ_CHANGE); in rescan_partitions()
/fs/gfs2/
Dsys.c181 static ssize_t gfs2_attr_show(struct kobject *kobj, struct attribute *attr, in gfs2_attr_show() argument
184 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_attr_show()
189 static ssize_t gfs2_attr_store(struct kobject *kobj, struct attribute *attr, in gfs2_attr_store() argument
192 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_attr_store()
461 static int gfs2_uevent(struct kset *kset, struct kobject *kobj, in gfs2_uevent() argument
464 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_uevent()
/fs/ocfs2/
Dstackglue.c448 static ssize_t ocfs2_max_locking_protocol_show(struct kobject *kobj, in ocfs2_max_locking_protocol_show() argument
468 static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, in ocfs2_loaded_cluster_plugins_show() argument
500 static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, in ocfs2_active_cluster_plugin_show() argument
522 static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj, in ocfs2_cluster_stack_show() argument
534 static ssize_t ocfs2_cluster_stack_store(struct kobject *kobj, in ocfs2_cluster_stack_store() argument
599 ret = sysfs_create_group(&ocfs2_kset->kobj, &ocfs2_attr_group); in ocfs2_sysfs_init()
/fs/dlm/
Dlockspace.c129 static ssize_t dlm_attr_show(struct kobject *kobj, struct attribute *attr, in dlm_attr_show() argument
132 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_attr_show()
137 static ssize_t dlm_attr_store(struct kobject *kobj, struct attribute *attr, in dlm_attr_store() argument
140 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_attr_store()
/fs/ecryptfs/
Dmain.c768 static ssize_t version_show(struct kobject *kobj, in version_show() argument