Lines Matching refs:attr
24 u32 attr; in fat_ioctl_get_attributes() local
27 attr = fat_make_attrs(inode); in fat_ioctl_get_attributes()
30 return put_user(attr, user_attr); in fat_ioctl_get_attributes()
38 u32 attr, oldattr; in fat_ioctl_set_attributes() local
42 err = get_user(attr, user_attr); in fat_ioctl_set_attributes()
57 attr &= 0xff & ~(ATTR_VOLUME | ATTR_DIR); in fat_ioctl_set_attributes()
59 attr |= (MSDOS_I(inode)->i_attrs & ATTR_VOLUME) | in fat_ioctl_set_attributes()
67 ia.ia_mode = fat_make_mode(sbi, attr, S_IRWXUGO); in fat_ioctl_set_attributes()
69 ia.ia_mode = fat_make_mode(sbi, attr, in fat_ioctl_set_attributes()
74 if (inode->i_ino == MSDOS_ROOT_INO && attr != ATTR_DIR) { in fat_ioctl_set_attributes()
80 ((attr | oldattr) & ATTR_SYS) && in fat_ioctl_set_attributes()
102 if (attr & ATTR_SYS) in fat_ioctl_set_attributes()
108 fat_save_attrs(inode, attr); in fat_ioctl_set_attributes()
371 int fat_setattr(struct dentry *dentry, struct iattr *attr) in fat_setattr() argument
379 ia_valid = attr->ia_valid; in fat_setattr()
382 attr->ia_valid &= ~TIMES_SET_FLAGS; in fat_setattr()
385 error = inode_change_ok(inode, attr); in fat_setattr()
386 attr->ia_valid = ia_valid; in fat_setattr()
399 if (attr->ia_valid & ATTR_SIZE) { in fat_setattr()
402 if (attr->ia_size > inode->i_size) { in fat_setattr()
403 error = fat_cont_expand(inode, attr->ia_size); in fat_setattr()
404 if (error || attr->ia_valid == ATTR_SIZE) in fat_setattr()
406 attr->ia_valid &= ~ATTR_SIZE; in fat_setattr()
410 if (((attr->ia_valid & ATTR_UID) && in fat_setattr()
411 (attr->ia_uid != sbi->options.fs_uid)) || in fat_setattr()
412 ((attr->ia_valid & ATTR_GID) && in fat_setattr()
413 (attr->ia_gid != sbi->options.fs_gid)) || in fat_setattr()
414 ((attr->ia_valid & ATTR_MODE) && in fat_setattr()
415 (attr->ia_mode & ~FAT_VALID_MODE))) in fat_setattr()
428 if (attr->ia_valid & ATTR_MODE) { in fat_setattr()
429 if (fat_sanitize_mode(sbi, inode, &attr->ia_mode) < 0) in fat_setattr()
430 attr->ia_valid &= ~ATTR_MODE; in fat_setattr()
433 if (attr->ia_valid & ATTR_SIZE) { in fat_setattr()
435 truncate_setsize(inode, attr->ia_size); in fat_setattr()
436 fat_truncate_blocks(inode, attr->ia_size); in fat_setattr()
440 setattr_copy(inode, attr); in fat_setattr()