/fs/orangefs/ |
D | orangefs-sysfs.c | 166 struct attribute attr; member 168 struct orangefs_attribute *attr, 171 struct orangefs_attribute *attr, 177 struct attribute *attr, in orangefs_attr_show() argument 182 attribute = container_of(attr, struct orangefs_attribute, attr); in orangefs_attr_show() 189 struct attribute *attr, in orangefs_attr_store() argument 199 attribute = container_of(attr, struct orangefs_attribute, attr); in orangefs_attr_store() 211 struct orangefs_attribute *attr, char *buf) in sysfs_int_show() argument 219 if (!strcmp(attr->attr.name, "op_timeout_secs")) { in sysfs_int_show() 225 } else if (!strcmp(attr->attr.name, in sysfs_int_show() [all …]
|
/fs/ |
D | attr.c | 120 int setattr_prepare(struct dentry *dentry, struct iattr *attr) in setattr_prepare() argument 123 unsigned int ia_valid = attr->ia_valid; in setattr_prepare() 130 int error = inode_newsize_ok(inode, attr->ia_size); in setattr_prepare() 140 if ((ia_valid & ATTR_UID) && !chown_ok(inode, attr->ia_uid)) in setattr_prepare() 144 if ((ia_valid & ATTR_GID) && !chgrp_ok(inode, attr->ia_gid)) in setattr_prepare() 153 attr->ia_gid : inode->i_gid)) in setattr_prepare() 154 attr->ia_mode &= ~S_ISGID; in setattr_prepare() 238 void setattr_copy(struct inode *inode, const struct iattr *attr) in setattr_copy() argument 240 unsigned int ia_valid = attr->ia_valid; in setattr_copy() 243 inode->i_uid = attr->ia_uid; in setattr_copy() [all …]
|
D | libfs.c | 894 struct simple_attr *attr; in simple_attr_open() local 896 attr = kzalloc(sizeof(*attr), GFP_KERNEL); in simple_attr_open() 897 if (!attr) in simple_attr_open() 900 attr->get = get; in simple_attr_open() 901 attr->set = set; in simple_attr_open() 902 attr->data = inode->i_private; in simple_attr_open() 903 attr->fmt = fmt; in simple_attr_open() 904 mutex_init(&attr->mutex); in simple_attr_open() 906 file->private_data = attr; in simple_attr_open() 923 struct simple_attr *attr; in simple_attr_read() local [all …]
|
/fs/sysfs/ |
D | group.c | 23 struct attribute *const *attr; in remove_files() local 27 for (attr = grp->attrs; *attr; attr++) in remove_files() 28 kernfs_remove_by_name(parent, (*attr)->name); in remove_files() 31 kernfs_remove_by_name(parent, (*bin_attr)->attr.name); in remove_files() 38 struct attribute *const *attr; in create_files() local 43 for (i = 0, attr = grp->attrs; *attr && !error; i++, attr++) { in create_files() 44 umode_t mode = (*attr)->mode; in create_files() 52 kernfs_remove_by_name(parent, (*attr)->name); in create_files() 54 mode = grp->is_visible(kobj, *attr, i); in create_files() 61 (*attr)->name, mode); in create_files() [all …]
|
D | file.c | 173 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr) in sysfs_notify() argument 182 if (kn && attr) { in sysfs_notify() 183 tmp = kernfs_find_and_get(kn, attr); in sysfs_notify() 247 const struct attribute *attr, bool is_bin, in sysfs_add_file_mode_ns() argument 285 struct bin_attribute *battr = (void *)attr; in sysfs_add_file_mode_ns() 302 if (!attr->ignore_lockdep) in sysfs_add_file_mode_ns() 303 key = attr->key ?: (struct lock_class_key *)&attr->skey; in sysfs_add_file_mode_ns() 306 kn = __kernfs_create_file(parent, attr->name, mode & 0777, uid, gid, in sysfs_add_file_mode_ns() 307 size, ops, (void *)attr, ns, key); in sysfs_add_file_mode_ns() 310 sysfs_warn_dup(parent, attr->name); in sysfs_add_file_mode_ns() [all …]
|
/fs/fat/ |
D | file.c | 26 u32 attr; in fat_ioctl_get_attributes() local 29 attr = fat_make_attrs(inode); in fat_ioctl_get_attributes() 32 return put_user(attr, user_attr); in fat_ioctl_get_attributes() 40 u32 attr, oldattr; in fat_ioctl_set_attributes() local 44 err = get_user(attr, user_attr); in fat_ioctl_set_attributes() 59 attr &= 0xff & ~(ATTR_VOLUME | ATTR_DIR); in fat_ioctl_set_attributes() 61 attr |= (MSDOS_I(inode)->i_attrs & ATTR_VOLUME) | in fat_ioctl_set_attributes() 69 ia.ia_mode = fat_make_mode(sbi, attr, S_IRWXUGO); in fat_ioctl_set_attributes() 71 ia.ia_mode = fat_make_mode(sbi, attr, in fat_ioctl_set_attributes() 76 if (inode->i_ino == MSDOS_ROOT_INO && attr != ATTR_DIR) { in fat_ioctl_set_attributes() [all …]
|
/fs/adfs/ |
D | inode.c | 89 unsigned int attr = ADFS_I(inode)->attr; in adfs_atts2mode() local 93 if (attr & ADFS_NDA_DIRECTORY) { in adfs_atts2mode() 112 if (attr & ADFS_NDA_OWNER_READ) in adfs_atts2mode() 115 if (attr & ADFS_NDA_OWNER_WRITE) in adfs_atts2mode() 118 if (attr & ADFS_NDA_PUBLIC_READ) in adfs_atts2mode() 121 if (attr & ADFS_NDA_PUBLIC_WRITE) in adfs_atts2mode() 135 int attr; in adfs_mode2atts() local 139 return ADFS_I(inode)->attr; in adfs_mode2atts() 145 attr = 0; in adfs_mode2atts() 148 attr |= ADFS_NDA_OWNER_READ; in adfs_mode2atts() [all …]
|
/fs/nilfs2/ |
D | sysfs.c | 37 struct attribute *attr, char *buf) \ 42 struct nilfs_##name##_attr *a = container_of(attr, \ 44 attr); \ 48 struct attribute *attr, \ 54 struct nilfs_##name##_attr *a = container_of(attr, \ 56 attr); \ 108 nilfs_snapshot_inodes_count_show(struct nilfs_snapshot_attr *attr, in nilfs_snapshot_inodes_count_show() argument 116 nilfs_snapshot_blocks_count_show(struct nilfs_snapshot_attr *attr, in nilfs_snapshot_blocks_count_show() argument 129 nilfs_snapshot_README_show(struct nilfs_snapshot_attr *attr, in nilfs_snapshot_README_show() argument 147 struct attribute *attr, char *buf) in nilfs_snapshot_attr_show() argument [all …]
|
D | sysfs.h | 55 struct attribute attr; \ 66 struct attribute attr; \ 82 struct attribute attr; \ 151 (&nilfs_feature_attr_##name.attr) 153 (&nilfs_dev_attr_##name.attr) 155 (&nilfs_segments_attr_##name.attr) 157 (&nilfs_mounted_snapshots_attr_##name.attr) 159 (&nilfs_checkpoints_attr_##name.attr) 161 (&nilfs_snapshot_attr_##name.attr) 163 (&nilfs_superblock_attr_##name.attr) [all …]
|
/fs/coda/ |
D | coda_linux.c | 90 void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr) in coda_vattr_to_iattr() argument 96 switch (attr->va_type) { in coda_vattr_to_iattr() 114 if (attr->va_mode != (u_short) -1) in coda_vattr_to_iattr() 115 inode->i_mode = attr->va_mode | inode_type; in coda_vattr_to_iattr() 116 if (attr->va_uid != -1) in coda_vattr_to_iattr() 117 inode->i_uid = make_kuid(&init_user_ns, (uid_t) attr->va_uid); in coda_vattr_to_iattr() 118 if (attr->va_gid != -1) in coda_vattr_to_iattr() 119 inode->i_gid = make_kgid(&init_user_ns, (gid_t) attr->va_gid); in coda_vattr_to_iattr() 120 if (attr->va_nlink != -1) in coda_vattr_to_iattr() 121 set_nlink(inode, attr->va_nlink); in coda_vattr_to_iattr() [all …]
|
D | cnode.c | 26 static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr) in coda_fill_inode() argument 28 coda_vattr_to_iattr(inode, attr); in coda_fill_inode() 42 init_special_inode(inode, inode->i_mode, huge_decode_dev(attr->va_rdev)); in coda_fill_inode() 61 struct coda_vattr * attr) in coda_iget() argument 82 coda_fill_inode(inode, attr); in coda_iget() 94 struct coda_vattr attr; in coda_cnode_make() local 99 error = venus_getattr(sb, fid, &attr); in coda_cnode_make() 103 inode = coda_iget(sb, fid, &attr); in coda_cnode_make()
|
/fs/exfat/ |
D | file.c | 149 ei->attr |= ATTR_ARCHIVE; in __exfat_truncate() 171 ep->dentry.file.attr = cpu_to_le16(ei->attr); in __exfat_truncate() 284 int exfat_setattr(struct dentry *dentry, struct iattr *attr) in exfat_setattr() argument 291 if ((attr->ia_valid & ATTR_SIZE) && in exfat_setattr() 292 attr->ia_size > i_size_read(inode)) { in exfat_setattr() 293 error = exfat_cont_expand(inode, attr->ia_size); in exfat_setattr() 294 if (error || attr->ia_valid == ATTR_SIZE) in exfat_setattr() 296 attr->ia_valid &= ~ATTR_SIZE; in exfat_setattr() 300 ia_valid = attr->ia_valid; in exfat_setattr() 303 attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET | in exfat_setattr() [all …]
|
D | exfat_fs.h | 186 unsigned short attr; member 263 unsigned short attr; member 334 unsigned short attr, mode_t mode) in exfat_make_mode() argument 336 if ((attr & ATTR_READONLY) && !(attr & ATTR_SUBDIR)) in exfat_make_mode() 339 if (attr & ATTR_SUBDIR) in exfat_make_mode() 348 unsigned short attr = EXFAT_I(inode)->attr; in exfat_make_attr() local 351 attr |= ATTR_SUBDIR; in exfat_make_attr() 353 attr |= ATTR_READONLY; in exfat_make_attr() 354 return attr; in exfat_make_attr() 357 static inline void exfat_save_attr(struct inode *inode, unsigned short attr) in exfat_save_attr() argument [all …]
|
/fs/incfs/ |
D | sysfs.c | 26 struct kobj_attribute *attr, char *buff) \ 40 &corefs_attr.attr, 41 &zstd_attr.attr, 42 &v2_attr.attr, 43 &bugfix_throttling_attr.attr, 44 &bugfix_inode_eviction_attr.attr, 102 struct kobj_attribute *attr, char *buff) \ 114 struct kobj_attribute *attr, char *buff) \ 133 &reads_failed_timed_out_attr.attr, 134 &reads_failed_hash_verification_attr.attr, [all …]
|
/fs/gfs2/ |
D | sys.c | 31 struct attribute attr; member 36 static ssize_t gfs2_attr_show(struct kobject *kobj, struct attribute *attr, in gfs2_attr_show() argument 40 struct gfs2_attr *a = container_of(attr, struct gfs2_attr, attr); in gfs2_attr_show() 44 static ssize_t gfs2_attr_store(struct kobject *kobj, struct attribute *attr, in gfs2_attr_store() argument 48 struct gfs2_attr *a = container_of(attr, struct gfs2_attr, attr); in gfs2_attr_store() 288 &gfs2_attr_id.attr, 289 &gfs2_attr_fsname.attr, 290 &gfs2_attr_uuid.attr, 291 &gfs2_attr_freeze.attr, 292 &gfs2_attr_withdraw.attr, [all …]
|
/fs/fuse/ |
D | dir.c | 242 (bool) IS_AUTOMOUNT(inode) != (bool) (outarg.attr.flags & FUSE_ATTR_SUBMOUNT)) { in fuse_dentry_revalidate() 254 if (ret || fuse_invalid_attr(&outarg.attr) || in fuse_dentry_revalidate() 255 fuse_stale_inode(inode, outarg.generation, &outarg.attr)) in fuse_dentry_revalidate() 259 fuse_change_attributes(inode, &outarg.attr, in fuse_dentry_revalidate() 455 bool fuse_invalid_attr(struct fuse_attr *attr) in fuse_invalid_attr() argument 457 return !fuse_valid_type(attr->mode) || in fuse_invalid_attr() 458 attr->size > LLONG_MAX; in fuse_invalid_attr() 492 if (fuse_invalid_attr(&outarg->attr)) in fuse_lookup_name() 496 &outarg->attr, entry_attr_timeout(outarg), in fuse_lookup_name() 622 if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid) || in fuse_create_open() [all …]
|
D | inode.c | 168 void fuse_change_attributes_common(struct inode *inode, struct fuse_attr *attr, in fuse_change_attributes_common() argument 180 inode->i_ino = fuse_squash_ino(attr->ino); in fuse_change_attributes_common() 181 inode->i_mode = (inode->i_mode & S_IFMT) | (attr->mode & 07777); in fuse_change_attributes_common() 182 set_nlink(inode, attr->nlink); in fuse_change_attributes_common() 183 inode->i_uid = make_kuid(fc->user_ns, attr->uid); in fuse_change_attributes_common() 184 inode->i_gid = make_kgid(fc->user_ns, attr->gid); in fuse_change_attributes_common() 185 inode->i_blocks = attr->blocks; in fuse_change_attributes_common() 188 attr->atimensec = min_t(u32, attr->atimensec, NSEC_PER_SEC - 1); in fuse_change_attributes_common() 189 attr->mtimensec = min_t(u32, attr->mtimensec, NSEC_PER_SEC - 1); in fuse_change_attributes_common() 190 attr->ctimensec = min_t(u32, attr->ctimensec, NSEC_PER_SEC - 1); in fuse_change_attributes_common() [all …]
|
/fs/sysv/ |
D | file.c | 32 static int sysv_setattr(struct dentry *dentry, struct iattr *attr) in sysv_setattr() argument 37 error = setattr_prepare(dentry, attr); in sysv_setattr() 41 if ((attr->ia_valid & ATTR_SIZE) && in sysv_setattr() 42 attr->ia_size != i_size_read(inode)) { in sysv_setattr() 43 error = inode_newsize_ok(inode, attr->ia_size); in sysv_setattr() 46 truncate_setsize(inode, attr->ia_size); in sysv_setattr() 50 setattr_copy(inode, attr); in sysv_setattr()
|
/fs/minix/ |
D | file.c | 25 static int minix_setattr(struct dentry *dentry, struct iattr *attr) in minix_setattr() argument 30 error = setattr_prepare(dentry, attr); in minix_setattr() 34 if ((attr->ia_valid & ATTR_SIZE) && in minix_setattr() 35 attr->ia_size != i_size_read(inode)) { in minix_setattr() 36 error = inode_newsize_ok(inode, attr->ia_size); in minix_setattr() 40 truncate_setsize(inode, attr->ia_size); in minix_setattr() 44 setattr_copy(inode, attr); in minix_setattr()
|
/fs/f2fs/ |
D | sysfs.c | 44 struct attribute attr; member 270 if (!strcmp(a->attr.name, "extension_list")) { in f2fs_sbi_show() 291 if (!strcmp(a->attr.name, "ckpt_thread_ioprio")) { in f2fs_sbi_show() 309 if (!strcmp(a->attr.name, "compr_written_block")) in f2fs_sbi_show() 312 if (!strcmp(a->attr.name, "compr_saved_block")) in f2fs_sbi_show() 315 if (!strcmp(a->attr.name, "compr_new_inode")) in f2fs_sbi_show() 319 if (!strcmp(a->attr.name, "gc_segment_mode")) in f2fs_sbi_show() 322 if (!strcmp(a->attr.name, "gc_reclaimed_segments")) { in f2fs_sbi_show() 345 if (!strcmp(a->attr.name, "extension_list")) { in __sbi_store() 380 if (!strcmp(a->attr.name, "ckpt_thread_ioprio")) { in __sbi_store() [all …]
|
/fs/ocfs2/ |
D | filecheck.c | 76 struct kobj_attribute *attr, 79 struct kobj_attribute *attr, 94 &ocfs2_filecheck_attr_chk.attr, 95 &ocfs2_filecheck_attr_fix.attr, 96 &ocfs2_filecheck_attr_set.attr, 109 ocfs2_filecheck_show(struct kobject *kobj, struct attribute *attr, char *buf) in ocfs2_filecheck_show() argument 112 struct kobj_attribute *kattr = container_of(attr, in ocfs2_filecheck_show() 113 struct kobj_attribute, attr); in ocfs2_filecheck_show() 123 ocfs2_filecheck_store(struct kobject *kobj, struct attribute *attr, in ocfs2_filecheck_store() argument 127 struct kobj_attribute *kattr = container_of(attr, in ocfs2_filecheck_store() [all …]
|
/fs/udf/ |
D | file.c | 254 static int udf_setattr(struct dentry *dentry, struct iattr *attr) in udf_setattr() argument 260 error = setattr_prepare(dentry, attr); in udf_setattr() 264 if ((attr->ia_valid & ATTR_UID) && in udf_setattr() 266 !uid_eq(attr->ia_uid, UDF_SB(sb)->s_uid)) in udf_setattr() 268 if ((attr->ia_valid & ATTR_GID) && in udf_setattr() 270 !gid_eq(attr->ia_gid, UDF_SB(sb)->s_gid)) in udf_setattr() 273 if ((attr->ia_valid & ATTR_SIZE) && in udf_setattr() 274 attr->ia_size != i_size_read(inode)) { in udf_setattr() 275 error = udf_setsize(inode, attr->ia_size); in udf_setattr() 280 if (attr->ia_valid & ATTR_MODE) in udf_setattr() [all …]
|
/fs/ocfs2/cluster/ |
D | masklog.c | 88 struct attribute attr; member 92 #define to_mlog_attr(_attr) container_of(_attr, struct mlog_attribute, attr) 95 .attr = { \ 127 static ssize_t mlog_show(struct kobject *obj, struct attribute *attr, in mlog_show() argument 130 struct mlog_attribute *mlog_attr = to_mlog_attr(attr); in mlog_show() 135 static ssize_t mlog_store(struct kobject *obj, struct attribute *attr, in mlog_store() argument 138 struct mlog_attribute *mlog_attr = to_mlog_attr(attr); in mlog_store() 161 while (mlog_attrs[i].attr.mode) { in mlog_sys_init() 162 mlog_attr_ptrs[i] = &mlog_attrs[i].attr; in mlog_sys_init()
|
/fs/ntfs/ |
D | namei.c | 212 a = ctx->attr; in ntfs_lookup() 219 fn = (FILE_NAME_ATTR*)((u8*)ctx->attr + le16_to_cpu( in ntfs_lookup() 220 ctx->attr->data.resident.value_offset)); in ntfs_lookup() 292 ATTR_RECORD *attr; in ntfs_get_parent() local 320 attr = ctx->attr; in ntfs_get_parent() 321 if (unlikely(attr->non_resident)) in ntfs_get_parent() 323 fn = (FILE_NAME_ATTR *)((u8 *)attr + in ntfs_get_parent() 324 le16_to_cpu(attr->data.resident.value_offset)); in ntfs_get_parent() 325 if (unlikely((u8 *)fn + le32_to_cpu(attr->data.resident.value_length) > in ntfs_get_parent() 326 (u8*)attr + le32_to_cpu(attr->length))) in ntfs_get_parent()
|
/fs/hostfs/ |
D | hostfs_kern.c | 785 static int hostfs_setattr(struct dentry *dentry, struct iattr *attr) in hostfs_setattr() argument 794 err = setattr_prepare(dentry, attr); in hostfs_setattr() 799 attr->ia_valid &= ~ATTR_SIZE; in hostfs_setattr() 802 if (attr->ia_valid & ATTR_MODE) { in hostfs_setattr() 804 attrs.ia_mode = attr->ia_mode; in hostfs_setattr() 806 if (attr->ia_valid & ATTR_UID) { in hostfs_setattr() 808 attrs.ia_uid = from_kuid(&init_user_ns, attr->ia_uid); in hostfs_setattr() 810 if (attr->ia_valid & ATTR_GID) { in hostfs_setattr() 812 attrs.ia_gid = from_kgid(&init_user_ns, attr->ia_gid); in hostfs_setattr() 814 if (attr->ia_valid & ATTR_SIZE) { in hostfs_setattr() [all …]
|