| /fs/nfs/ |
| A D | sysfs.c | 26 struct kset *kset = container_of(kobj, struct kset, kobj); in nfs_kset_release() 31 const struct kobject *kobj) in nfs_netns_object_child_ns_type() argument 56 nfs_kset->kobj.parent = fs_kobj; in nfs_sysfs_init() 58 nfs_kset->kobj.kset = NULL; in nfs_sysfs_init() 255 struct nfs_server *server = container_of(kobj, struct nfs_server, kobj); in shutdown_show() 267 server = container_of(kobj, struct nfs_server, kobj); in shutdown_store() 300 struct nfs_server *server = container_of(kobj, struct nfs_server, kobj); in implid_domain_show() 315 struct nfs_server *server = container_of(kobj, struct nfs_server, kobj); in implid_name_show() 354 return container_of(kobj, struct nfs_server, kobj)->nfs_client->cl_net; in nfs_netns_server_namespace() 396 struct nfs_server *server = container_of(kobj, struct nfs_server, kobj); in localio_show() [all …]
|
| /fs/sysfs/ |
| A D | group.c | 131 if (WARN_ON(!kobj || (!update && !kobj->sd))) in internal_create_group() 135 if (unlikely(update && !kobj->sd)) in internal_create_group() 140 kobj->name, grp->name ?: ""); in internal_create_group() 157 kobj->name, grp->name); in internal_create_group() 161 sysfs_remove_group(kobj, grp); in internal_create_group() 171 uid, gid, kobj, NULL); in internal_create_group() 179 kn = kobj->sd; in internal_create_group() 562 if (!kobj->state_in_sysfs) in sysfs_group_change_owner() 568 kernfs_get(kobj->sd); in sysfs_group_change_owner() 569 grp_kn = kobj->sd; in sysfs_group_change_owner() [all …]
|
| A D | file.c | 38 return kobj->ktype ? kobj->ktype->sysfs_ops : NULL; in sysfs_file_ops() 292 kobject_name(kobj))) in sysfs_add_file_mode_ns() 382 if (WARN_ON(!kobj || !kobj->sd || !attr)) in sysfs_create_file_ns() 421 parent = kobj->sd; in sysfs_add_file_to_group() 480 kobject_get(kobj); in sysfs_break_active_protection() 485 kobject_put(kobj); in sysfs_break_active_protection() 507 kobject_put(kobj); in sysfs_unbreak_active_protection() 575 parent = kobj->sd; in sysfs_remove_file_from_group() 597 if (WARN_ON(!kobj || !kobj->sd || !attr)) in sysfs_create_bin_file() 691 if (!kobj->state_in_sysfs) in sysfs_file_change_owner() [all …]
|
| A D | dir.c | 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() 60 kobj, ns); in sysfs_create_dir_ns() 67 kobj->sd = kn; in sysfs_create_dir_ns() 79 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir() argument 81 struct kernfs_node *kn = kobj->sd; in sysfs_remove_dir() 96 kobj->sd = NULL; in sysfs_remove_dir() 111 parent = kernfs_get_parent(kobj->sd); in sysfs_rename_dir_ns() [all …]
|
| A D | symlink.c | 72 if (!kobj) in sysfs_do_create_link() 75 parent = kobj->sd; in sysfs_do_create_link() 92 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link() 108 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn() 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() 143 void sysfs_remove_link(struct kobject *kobj, const char *name) in sysfs_remove_link() argument 147 if (!kobj) in sysfs_remove_link() 150 parent = kobj->sd; in sysfs_remove_link() 173 if (!kobj) in sysfs_rename_link_ns() [all …]
|
| /fs/btrfs/ |
| A D | sysfs.c | 58 struct kobject kobj; member 1633 while (kobj) { in get_btrfs_kobj() 1635 return kobj; in get_btrfs_kobj() 1636 kobj = kobj->parent; in get_btrfs_kobj() 1904 ret = kobject_add(&rkobj->kobj, &space_info->kobj, "%s", in btrfs_sysfs_add_block_group_type() 1927 struct kobject *kobj; in btrfs_sysfs_remove_space_info() local 1931 if (kobj) { in btrfs_sysfs_remove_space_info() 1932 kobject_del(kobj); in btrfs_sysfs_remove_space_info() 1933 kobject_put(kobj); in btrfs_sysfs_remove_space_info() 2503 kfree(kobj); in qgroups_release() [all …]
|
| /fs/ |
| A D | char_dev.c | 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() 387 if (!kobj) in chrdev_open() 389 new = container_of(kobj, struct cdev, kobj); in chrdev_open() 460 return &p->kobj; in exact_match() 502 p->kobj.name = NULL; in cdev_add() 518 p->kobj.parent = kobj; in cdev_set_parent() 610 struct cdev *p = container_of(kobj, struct cdev, kobj); in cdev_default_release() [all …]
|
| /fs/ubifs/ |
| A D | sysfs.c | 47 static ssize_t ubifs_attr_show(struct kobject *kobj, in ubifs_attr_show() argument 51 kobj); in ubifs_attr_show() 66 static void ubifs_sb_release(struct kobject *kobj) in ubifs_sb_release() argument 68 struct ubifs_info *c = container_of(kobj, struct ubifs_info, kobj); in ubifs_sb_release() 88 .kobj = {.ktype = &ubifs_ktype}, 110 c->kobj.kset = &ubifs_kset; in ubifs_sysfs_register() 121 kobject_put(&c->kobj); in ubifs_sysfs_register() 133 kobject_del(&c->kobj); in ubifs_sysfs_unregister() 134 kobject_put(&c->kobj); in ubifs_sysfs_unregister() 144 kobject_set_name(&ubifs_kset.kobj, "ubifs"); in ubifs_sysfs_init() [all …]
|
| /fs/xfs/ |
| A D | xfs_sysfs.h | 23 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release() local 24 complete(&kobj->complete); in xfs_sysfs_release() 29 struct xfs_kobj *kobj, in xfs_sysfs_init() argument 38 init_completion(&kobj->complete); in xfs_sysfs_init() 39 err = kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name); in xfs_sysfs_init() 41 kobject_put(&kobj->kobject); in xfs_sysfs_init() 48 struct xfs_kobj *kobj) in xfs_sysfs_del() argument 50 kobject_del(&kobj->kobject); in xfs_sysfs_del() 51 kobject_put(&kobj->kobject); in xfs_sysfs_del() 52 wait_for_completion(&kobj->complete); in xfs_sysfs_del()
|
| A D | xfs_sysfs.c | 342 struct xfs_kobj *kobj = to_kobj(kobject); in to_xstats() local 398 struct xfs_kobj *kobj = to_kobj(kobject); in to_xlog() local 483 struct xfs_kobj *kobj = to_kobj(kobject); in to_error_cfg() local 484 return container_of(kobj, struct xfs_error_cfg, kobj); in to_error_cfg() 490 struct xfs_kobj *kobj = to_kobj(kobject); in err_to_mp() local 699 xfs_sysfs_del(&cfg->kobj); in xfs_error_sysfs_init_class() 712 struct kobject *kobj, in max_open_zones_show() argument 723 struct kobject *kobj, in zonegc_low_space_store() argument 744 struct kobject *kobj, in zonegc_low_space_show() argument 748 zoned_to_mp(kobj)->m_zonegc_low_space); in zonegc_low_space_show() [all …]
|
| /fs/orangefs/ |
| A D | orangefs-sysfs.c | 167 ssize_t (*show)(struct kobject *kobj, 170 ssize_t (*store)(struct kobject *kobj, 195 if (!strcmp(kobj->name, PC_KOBJ_ID) || in orangefs_attr_store() 216 kobj->name); in sysfs_int_show() 323 kobj->name); in sysfs_service_op_show() 325 if (strcmp(kobj->name, PC_KOBJ_ID)) in sysfs_service_op_show() 343 if (strcmp(kobj->name, PC_KOBJ_ID)) in sysfs_service_op_show() 471 kobj->name); in sysfs_service_op_show() 477 if (strcmp(kobj->name, PC_KOBJ_ID)) in sysfs_service_op_show() 536 kobj->name); in sysfs_service_op_store() [all …]
|
| /fs/ocfs2/ |
| A D | filecheck.c | 73 static ssize_t ocfs2_filecheck_attr_show(struct kobject *kobj, 76 static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj, 99 static void ocfs2_filecheck_release(struct kobject *kobj) in ocfs2_filecheck_release() argument 101 struct ocfs2_filecheck_sysfs_entry *entry = container_of(kobj, in ocfs2_filecheck_release() 114 kobject_get(kobj); in ocfs2_filecheck_show() 116 ret = kattr->show(kobj, kattr, buf); in ocfs2_filecheck_show() 117 kobject_put(kobj); in ocfs2_filecheck_show() 129 kobject_get(kobj); in ocfs2_filecheck_store() 131 ret = kattr->store(kobj, kattr, buf, count); in ocfs2_filecheck_store() 132 kobject_put(kobj); in ocfs2_filecheck_store() [all …]
|
| A D | stackglue.c | 472 static ssize_t ocfs2_max_locking_protocol_show(struct kobject *kobj, in ocfs2_max_locking_protocol_show() argument 492 static ssize_t ocfs2_loaded_cluster_plugins_show(struct kobject *kobj, in ocfs2_loaded_cluster_plugins_show() argument 520 static ssize_t ocfs2_active_cluster_plugin_show(struct kobject *kobj, in ocfs2_active_cluster_plugin_show() argument 542 static ssize_t ocfs2_cluster_stack_show(struct kobject *kobj, in ocfs2_cluster_stack_show() argument 554 static ssize_t ocfs2_cluster_stack_store(struct kobject *kobj, in ocfs2_cluster_stack_store() argument 594 static ssize_t ocfs2_dlm_recover_show(struct kobject *kobj, in ocfs2_dlm_recover_show() argument 634 ret = sysfs_create_group(&ocfs2_kset->kobj, &ocfs2_attr_group); in ocfs2_sysfs_init()
|
| /fs/nilfs2/ |
| A D | sysfs.c | 23 static ssize_t nilfs_##name##_attr_show(struct kobject *kobj, \ 26 struct the_nilfs *nilfs = container_of(kobj->parent, \ 38 struct the_nilfs *nilfs = container_of(kobj->parent, \ 69 struct kobject *kobj; \ 74 kobj = &subgroups->sg_##name##_kobj; \ 77 kobj->kset = nilfs_kset; \ 82 kobject_put(kobj); \ 138 container_of(kobj, struct nilfs_root, snapshot_kobj); in nilfs_snapshot_attr_show() 150 container_of(kobj, struct nilfs_root, snapshot_kobj); in nilfs_snapshot_attr_store() 958 static ssize_t nilfs_dev_attr_show(struct kobject *kobj, in nilfs_dev_attr_show() argument [all …]
|
| /fs/bcachefs/ |
| A D | sysfs.c | 65 ssize_t ret = fn ## _to_text(&out, kobj, attr); \ 91 return bch2_err_class(fn##_store_inner(kobj, attr, buf, size)); \ 308 struct bch_fs *c = container_of(kobj, struct bch_fs, kobj); in SHOW() 396 struct bch_fs *c = container_of(kobj, struct bch_fs, kobj); in STORE() 566 struct bch_fs *c = container_of(kobj, struct bch_fs, internal); in SHOW() 568 return bch2_fs_to_text(out, &c->kobj, attr); in SHOW() 573 struct bch_fs *c = container_of(kobj, struct bch_fs, internal); in STORE() 575 return bch2_fs_store(&c->kobj, attr, buf, size); in STORE() 733 int ret = sysfs_create_file(kobj, &i->attr); in bch2_opts_create_sysfs_files() 799 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in SHOW() [all …]
|
| A D | super.c | 665 struct bch_fs *c = container_of(kobj, struct bch_fs, kobj); in bch2_fs_release() 689 if (c->kobj.state_in_sysfs) in __bch2_fs_stop() 690 kobject_del(&c->kobj); in __bch2_fs_stop() 734 kobject_put(&c->kobj); in bch2_fs_free() 845 c->kobj.kset = bcachefs_kset; in bch2_fs_alloc() 1366 struct bch_dev *ca = container_of(kobj, struct bch_dev, kobj); in bch2_dev_release() 1380 if (ca->kobj.state_in_sysfs) in bch2_dev_free() 1381 kobject_del(&ca->kobj); in bch2_dev_free() 1402 kobject_put(&ca->kobj); in bch2_dev_free() 1456 if (!c->kobj.state_in_sysfs) in bch2_dev_sysfs_online() [all …]
|
| /fs/fuse/ |
| A D | virtio_fs.c | 58 struct kobject *kobj; member 64 struct kobject kobj; member 177 struct virtio_fs *fs = container_of(kobj, struct virtio_fs, kobj); in tag_show() 192 struct virtio_fs *vfs = container_of(kobj, struct virtio_fs, kobj); in virtio_fs_ktype_release() 206 struct kobject *kobj) in virtio_fs_kobj_to_vq() argument 211 if (kobj == fs->vqs[i].kobj) in virtio_fs_kobj_to_vq() 220 struct virtio_fs *fs = container_of(kobj->parent->parent, struct virtio_fs, kobj); in name_show() 278 kobject_put(&fs->kobj); in virtio_fs_put_locked() 429 ret = sysfs_create_link(&fs->kobj, &vdev->dev.kobj, "device"); in virtio_fs_add_instance() 450 kobject_del(&fs->kobj); in virtio_fs_add_instance() [all …]
|
| /fs/erofs/ |
| A D | sysfs.c | 129 static ssize_t erofs_attr_show(struct kobject *kobj, in erofs_attr_show() argument 132 struct erofs_sb_info *sbi = container_of(kobj, struct erofs_sb_info, in erofs_attr_show() 154 static ssize_t erofs_attr_store(struct kobject *kobj, struct attribute *attr, in erofs_attr_store() argument 157 struct erofs_sb_info *sbi = container_of(kobj, struct erofs_sb_info, in erofs_attr_store() 221 static void erofs_sb_release(struct kobject *kobj) in erofs_sb_release() argument 223 struct erofs_sb_info *sbi = container_of(kobj, struct erofs_sb_info, in erofs_sb_release() 245 .kobj = {.ktype = &erofs_ktype}, 294 kobject_set_name(&erofs_root.kobj, "erofs"); in erofs_init_sysfs() 295 erofs_root.kobj.parent = fs_kobj; in erofs_init_sysfs()
|
| /fs/zonefs/ |
| A D | sysfs.c | 23 static ssize_t zonefs_sysfs_attr_show(struct kobject *kobj, in zonefs_sysfs_attr_show() argument 27 container_of(kobj, struct zonefs_sb_info, s_kobj); in zonefs_sysfs_attr_show() 70 static void zonefs_sysfs_sb_release(struct kobject *kobj) in zonefs_sysfs_sb_release() argument 73 container_of(kobj, struct zonefs_sb_info, s_kobj); in zonefs_sysfs_sb_release()
|
| /fs/f2fs/ |
| A D | sysfs.c | 893 static ssize_t f2fs_attr_show(struct kobject *kobj, in f2fs_attr_show() argument 913 static void f2fs_sb_release(struct kobject *kobj) in f2fs_sb_release() argument 920 static ssize_t f2fs_base_attr_show(struct kobject *kobj, in f2fs_base_attr_show() argument 929 static ssize_t f2fs_base_attr_store(struct kobject *kobj, in f2fs_base_attr_store() argument 1493 .kobj = {.ktype = &f2fs_ktype}, 1524 static ssize_t f2fs_stat_attr_show(struct kobject *kobj, in f2fs_stat_attr_show() argument 1544 static void f2fs_stat_kobj_release(struct kobject *kobj) in f2fs_stat_kobj_release() argument 1562 static ssize_t f2fs_sb_feat_attr_show(struct kobject *kobj, in f2fs_sb_feat_attr_show() argument 1572 static void f2fs_feature_list_kobj_release(struct kobject *kobj) in f2fs_feature_list_kobj_release() argument 1767 kobject_set_name(&f2fs_kset.kobj, "f2fs"); in f2fs_init_sysfs() [all …]
|
| /fs/ext4/ |
| A D | sysfs.c | 414 static ssize_t ext4_attr_show(struct kobject *kobj, in ext4_attr_show() argument 417 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_attr_show() 507 static ssize_t ext4_attr_store(struct kobject *kobj, in ext4_attr_store() argument 511 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_attr_store() 527 static void ext4_sb_release(struct kobject *kobj) in ext4_sb_release() argument 529 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_sb_release() 534 static void ext4_feat_release(struct kobject *kobj) in ext4_feat_release() argument 536 kfree(kobj); in ext4_feat_release()
|
| /fs/gfs2/ |
| A D | sys.c | 36 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() 379 static void gfs2_sbd_release(struct kobject *kobj) in gfs2_sbd_release() argument 381 struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_sbd_release() 751 &disk_to_dev(sb->s_bdev->bd_disk)->kobj, in gfs2_sys_fs_add() 779 static int gfs2_uevent(const struct kobject *kobj, struct kobj_uevent_env *env) in gfs2_uevent() argument 781 const struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj); in gfs2_uevent()
|
| /fs/ocfs2/cluster/ |
| A D | sys.c | 21 static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, in version_show() argument 54 ret = sysfs_create_group(&o2cb_kset->kobj, &o2cb_attr_group); in o2cb_sys_init()
|
| A D | masklog.c | 153 .kobj = {.ktype = &mlog_ktype}, 166 kobject_set_name(&mlog_kset.kobj, "logmask"); in mlog_sys_init() 167 mlog_kset.kobj.kset = o2cb_kset; in mlog_sys_init()
|
| /fs/dlm/ |
| A D | lockspace.c | 161 static ssize_t dlm_attr_show(struct kobject *kobj, struct attribute *attr, in dlm_attr_show() argument 164 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_attr_show() 169 static ssize_t dlm_attr_store(struct kobject *kobj, struct attribute *attr, in dlm_attr_store() argument 172 struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_attr_store() 209 static int dlm_uevent(const struct kobject *kobj, struct kobj_uevent_env *env) in dlm_uevent() argument 211 const struct dlm_ls *ls = container_of(kobj, struct dlm_ls, ls_kobj); in dlm_uevent()
|