Home
last modified time | relevance | path

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

12

/fs/sysfs/
Dgroup.c33 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files() argument
53 mode = grp->is_visible(kobj, *attr, i); in create_files()
82 mode = grp->is_bin_visible(kobj, *bin_attr, i); in create_files()
107 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group() argument
115 if (WARN_ON(!kobj || (!update && !kobj->sd))) in internal_create_group()
119 if (unlikely(update && !kobj->sd)) in internal_create_group()
123 kobj->name, grp->name ?: ""); in internal_create_group()
126 kobject_get_ownership(kobj, &uid, &gid); in internal_create_group()
129 kn = kernfs_find_and_get(kobj->sd, grp->name); in internal_create_group()
132 kobj->name, grp->name); in internal_create_group()
[all …]
Dfile.c27 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops() local
31 return kobj->ktype ? kobj->ktype->sysfs_ops : NULL; in sysfs_file_ops()
42 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show() local
60 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
83 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read() local
99 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read()
107 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read() local
116 len = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read()
133 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write() local
138 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write()
[all …]
Ddir.c40 int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) in sysfs_create_dir_ns() argument
46 if (WARN_ON(!kobj)) in sysfs_create_dir_ns()
49 if (kobj->parent) in sysfs_create_dir_ns()
50 parent = kobj->parent->sd; in sysfs_create_dir_ns()
57 kobject_get_ownership(kobj, &uid, &gid); in sysfs_create_dir_ns()
59 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), in sysfs_create_dir_ns()
61 kobj, ns); in sysfs_create_dir_ns()
64 sysfs_warn_dup(parent, kobject_name(kobj)); in sysfs_create_dir_ns()
68 kobj->sd = kn; in sysfs_create_dir_ns()
80 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir() argument
[all …]
Dsymlink.c67 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link() argument
72 if (!kobj) in sysfs_do_create_link()
75 parent = kobj->sd; in sysfs_do_create_link()
89 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link() argument
92 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link()
105 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn() argument
108 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn()
121 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, in sysfs_delete_link() argument
132 if (targ->sd && kernfs_ns_enabled(kobj->sd)) in sysfs_delete_link()
135 kernfs_remove_by_name_ns(kobj->sd, name, ns); in sysfs_delete_link()
[all …]
/fs/btrfs/
Dsysfs.c30 struct kobject kobj; member
69 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj);
70 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj);
143 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show() argument
147 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show()
159 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument
169 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
227 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument
230 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible()
291 static ssize_t rmdir_subvol_show(struct kobject *kobj, in rmdir_subvol_show() argument
[all …]
Dspace-info.h68 struct kobject kobj; member
/fs/nfs/
Dsysfs.c23 static void nfs_netns_object_release(struct kobject *kobj) in nfs_netns_object_release() argument
25 kfree(kobj); in nfs_netns_object_release()
29 struct kobject *kobj) in nfs_netns_object_child_ns_type() argument
43 struct kobject *kobj; in nfs_netns_object_alloc() local
45 kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); in nfs_netns_object_alloc()
46 if (kobj) { in nfs_netns_object_alloc()
47 kobj->kset = kset; in nfs_netns_object_alloc()
48 if (kobject_init_and_add(kobj, &nfs_netns_object_type, in nfs_netns_object_alloc()
50 return kobj; in nfs_netns_object_alloc()
51 kobject_put(kobj); in nfs_netns_object_alloc()
[all …]
/fs/
Dchar_dev.c286 kobject_set_name(&cdev->kobj, "%s", name); in __register_chrdev()
296 kobject_put(&cdev->kobj); in __register_chrdev()
351 struct kobject *kobj; in cdev_get() local
355 kobj = kobject_get_unless_zero(&p->kobj); in cdev_get()
356 if (!kobj) in cdev_get()
358 return kobj; in cdev_get()
365 kobject_put(&p->kobj); in cdev_put()
383 struct kobject *kobj; in chrdev_open() local
386 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); in chrdev_open()
387 if (!kobj) in chrdev_open()
[all …]
Dblock_dev.c1331 ret = add_symlink(disk->slave_dir, &part_to_dev(bdev->bd_part)->kobj); in bd_link_disk_holder()
1335 ret = add_symlink(bdev->bd_part->holder_dir, &disk_to_dev(disk)->kobj); in bd_link_disk_holder()
1348 del_symlink(disk->slave_dir, &part_to_dev(bdev->bd_part)->kobj); in bd_link_disk_holder()
1376 del_symlink(disk->slave_dir, &part_to_dev(bdev->bd_part)->kobj); in bd_unlink_disk_holder()
1378 &disk_to_dev(disk)->kobj); in bd_unlink_disk_holder()
/fs/xfs/
Dxfs_sysfs.h24 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release() local
25 complete(&kobj->complete); in xfs_sysfs_release()
30 struct xfs_kobj *kobj, in xfs_sysfs_init() argument
35 init_completion(&kobj->complete); in xfs_sysfs_init()
36 return kobject_init_and_add(&kobj->kobject, ktype, in xfs_sysfs_init()
42 struct xfs_kobj *kobj) in xfs_sysfs_del() argument
44 kobject_del(&kobj->kobject); in xfs_sysfs_del()
45 kobject_put(&kobj->kobject); in xfs_sysfs_del()
46 wait_for_completion(&kobj->complete); in xfs_sysfs_del()
Dxfs_sysfs.c255 struct xfs_kobj *kobj = to_kobj(kobject); in to_xstats() local
257 return container_of(kobj, struct xstats, xs_kobj); in to_xstats()
310 struct xfs_kobj *kobj = to_kobj(kobject); in to_xlog() local
312 return container_of(kobj, struct xlog, l_kobj); in to_xlog()
403 struct xfs_kobj *kobj = to_kobj(kobject); in to_error_cfg() local
404 return container_of(kobj, struct xfs_error_cfg, kobj); in to_error_cfg()
410 struct xfs_kobj *kobj = to_kobj(kobject); in err_to_mp() local
411 return container_of(kobj, struct xfs_mount, m_error_kobj); in err_to_mp()
601 error = xfs_sysfs_init(&cfg->kobj, &xfs_error_cfg_ktype, in xfs_error_sysfs_init_class()
619 xfs_sysfs_del(&cfg->kobj); in xfs_error_sysfs_init_class()
[all …]
Dxfs_error.c72 struct xfs_kobj *kobj = to_kobj(kobject); in to_mp() local
74 return container_of(kobj, struct xfs_mount, m_errortag_kobj); in to_mp()
Dxfs_mount.h55 struct xfs_kobj kobj; member
/fs/orangefs/
Dorangefs-sysfs.c167 ssize_t (*show)(struct kobject *kobj,
170 ssize_t (*store)(struct kobject *kobj,
176 static ssize_t orangefs_attr_show(struct kobject *kobj, in orangefs_attr_show() argument
185 return attribute->show(kobj, attribute, buf); in orangefs_attr_show()
188 static ssize_t orangefs_attr_store(struct kobject *kobj, in orangefs_attr_store() argument
195 if (!strcmp(kobj->name, PC_KOBJ_ID) || in orangefs_attr_store()
196 !strcmp(kobj->name, STATS_KOBJ_ID)) in orangefs_attr_store()
202 return attribute->store(kobj, attribute, buf, len); in orangefs_attr_store()
210 static ssize_t sysfs_int_show(struct kobject *kobj, in sysfs_int_show() argument
216 kobj->name); in sysfs_int_show()
[all …]
/fs/ocfs2/
Dfilecheck.c75 static ssize_t ocfs2_filecheck_attr_show(struct kobject *kobj,
78 static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
100 static void ocfs2_filecheck_release(struct kobject *kobj) in ocfs2_filecheck_release() argument
102 struct ocfs2_filecheck_sysfs_entry *entry = container_of(kobj, in ocfs2_filecheck_release()
109 ocfs2_filecheck_show(struct kobject *kobj, struct attribute *attr, char *buf) in ocfs2_filecheck_show() argument
115 kobject_get(kobj); in ocfs2_filecheck_show()
117 ret = kattr->show(kobj, kattr, buf); in ocfs2_filecheck_show()
118 kobject_put(kobj); in ocfs2_filecheck_show()
123 ocfs2_filecheck_store(struct kobject *kobj, struct attribute *attr, in ocfs2_filecheck_store() argument
130 kobject_get(kobj); in ocfs2_filecheck_store()
[all …]
Dstackglue.c474 static ssize_t ocfs2_max_locking_protocol_show(struct kobject *kobj, in ocfs2_max_locking_protocol_show() argument
494 static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, in ocfs2_loaded_cluster_plugins_show() argument
526 static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, in ocfs2_active_cluster_plugin_show() argument
548 static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj, in ocfs2_cluster_stack_show() argument
560 static ssize_t ocfs2_cluster_stack_store(struct kobject *kobj, in ocfs2_cluster_stack_store() argument
600 static ssize_t ocfs2_dlm_recover_show(struct kobject *kobj, in ocfs2_dlm_recover_show() argument
640 ret = sysfs_create_group(&ocfs2_kset->kobj, &ocfs2_attr_group); in ocfs2_sysfs_init()
/fs/nilfs2/
Dsysfs.c36 static ssize_t nilfs_##name##_attr_show(struct kobject *kobj, \
39 struct the_nilfs *nilfs = container_of(kobj->parent, \
47 static ssize_t nilfs_##name##_attr_store(struct kobject *kobj, \
51 struct the_nilfs *nilfs = container_of(kobj->parent, \
65 static void nilfs_##name##_attr_release(struct kobject *kobj) \
68 struct the_nilfs *nilfs = container_of(kobj->parent, \
84 struct kobject *kobj; \
89 kobj = &subgroups->sg_##name##_kobj; \
92 kobj->kset = nilfs_kset; \
94 err = kobject_init_and_add(kobj, &nilfs_##name##_ktype, parent, \
[all …]
/fs/gfs2/
Dsys.c36 static ssize_t gfs2_attr_show(struct kobject *kobj, struct attribute *attr, in gfs2_attr_show() argument
39 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_attr_show()
44 static ssize_t gfs2_attr_store(struct kobject *kobj, struct attribute *attr, in gfs2_attr_store() argument
47 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_attr_store()
301 static void gfs2_sbd_release(struct kobject *kobj) in gfs2_sbd_release() argument
303 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_sbd_release()
670 &disk_to_dev(sb->s_bdev->bd_disk)->kobj, in gfs2_sys_fs_add()
697 static int gfs2_uevent(struct kset *kset, struct kobject *kobj, in gfs2_uevent() argument
700 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_uevent()
/fs/ext4/
Dsysfs.c290 static ssize_t ext4_attr_show(struct kobject *kobj, in ext4_attr_show() argument
293 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_attr_show()
339 static ssize_t ext4_attr_store(struct kobject *kobj, in ext4_attr_store() argument
343 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_attr_store()
372 static void ext4_sb_release(struct kobject *kobj) in ext4_sb_release() argument
374 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_sb_release()
/fs/f2fs/
Dsysfs.c351 static ssize_t f2fs_attr_show(struct kobject *kobj, in f2fs_attr_show() argument
354 struct f2fs_sb_info *sbi = container_of(kobj, struct f2fs_sb_info, in f2fs_attr_show()
361 static ssize_t f2fs_attr_store(struct kobject *kobj, struct attribute *attr, in f2fs_attr_store() argument
364 struct f2fs_sb_info *sbi = container_of(kobj, struct f2fs_sb_info, in f2fs_attr_store()
371 static void f2fs_sb_release(struct kobject *kobj) in f2fs_sb_release() argument
373 struct f2fs_sb_info *sbi = container_of(kobj, struct f2fs_sb_info, in f2fs_sb_release()
596 .kobj = {.ktype = &f2fs_ktype},
728 kobject_set_name(&f2fs_kset.kobj, "f2fs"); in f2fs_init_sysfs()
729 f2fs_kset.kobj.parent = fs_kobj; in f2fs_init_sysfs()
/fs/ocfs2/cluster/
Dsys.c23 static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, in version_show() argument
56 ret = sysfs_create_group(&o2cb_kset->kobj, &o2cb_attr_group); in o2cb_sys_init()
Dmasklog.c154 .kobj = {.ktype = &mlog_ktype},
167 kobject_set_name(&mlog_kset.kobj, "logmask"); in mlog_sys_init()
168 mlog_kset.kobj.kset = o2cb_kset; in mlog_sys_init()
/fs/fscache/
Dcache.c244 cache->kobj = kobject_create_and_add(tagname, fscache_root); in fscache_add_cache()
245 if (!cache->kobj) in fscache_add_cache()
281 kobject_uevent(cache->kobj, KOBJ_ADD); in fscache_add_cache()
409 kobject_put(cache->kobj); in fscache_withdraw_cache()
/fs/dlm/
Dlockspace.c163 static ssize_t dlm_attr_show(struct kobject *kobj, struct attribute *attr, in dlm_attr_show() argument
166 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_attr_show()
171 static ssize_t dlm_attr_store(struct kobject *kobj, struct attribute *attr, in dlm_attr_store() argument
174 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_attr_store()
228 static int dlm_uevent(struct kset *kset, struct kobject *kobj, in dlm_uevent() argument
231 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_uevent()
/fs/incfs/
Dmain.c25 static ssize_t corefs_show(struct kobject *kobj, in corefs_show() argument

12