Lines Matching refs:attr
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()
82 ((attr | oldattr) & ATTR_SYS) && in fat_ioctl_set_attributes()
104 if (attr & ATTR_SYS) in fat_ioctl_set_attributes()
110 fat_save_attrs(inode, attr); in fat_ioctl_set_attributes()
480 int fat_setattr(struct dentry *dentry, struct iattr *attr) in fat_setattr() argument
488 ia_valid = attr->ia_valid; in fat_setattr()
491 attr->ia_valid &= ~TIMES_SET_FLAGS; in fat_setattr()
494 error = setattr_prepare(dentry, attr); in fat_setattr()
495 attr->ia_valid = ia_valid; in fat_setattr()
508 if (attr->ia_valid & ATTR_SIZE) { in fat_setattr()
511 if (attr->ia_size > inode->i_size) { in fat_setattr()
512 error = fat_cont_expand(inode, attr->ia_size); in fat_setattr()
513 if (error || attr->ia_valid == ATTR_SIZE) in fat_setattr()
515 attr->ia_valid &= ~ATTR_SIZE; in fat_setattr()
519 if (((attr->ia_valid & ATTR_UID) && in fat_setattr()
520 (!uid_eq(attr->ia_uid, sbi->options.fs_uid))) || in fat_setattr()
521 ((attr->ia_valid & ATTR_GID) && in fat_setattr()
522 (!gid_eq(attr->ia_gid, sbi->options.fs_gid))) || in fat_setattr()
523 ((attr->ia_valid & ATTR_MODE) && in fat_setattr()
524 (attr->ia_mode & ~FAT_VALID_MODE))) in fat_setattr()
537 if (attr->ia_valid & ATTR_MODE) { in fat_setattr()
538 if (fat_sanitize_mode(sbi, inode, &attr->ia_mode) < 0) in fat_setattr()
539 attr->ia_valid &= ~ATTR_MODE; in fat_setattr()
542 if (attr->ia_valid & ATTR_SIZE) { in fat_setattr()
543 error = fat_block_truncate_page(inode, attr->ia_size); in fat_setattr()
547 truncate_setsize(inode, attr->ia_size); in fat_setattr()
548 fat_truncate_blocks(inode, attr->ia_size); in fat_setattr()
556 if (attr->ia_valid & ATTR_ATIME) in fat_setattr()
557 fat_truncate_time(inode, &attr->ia_atime, S_ATIME); in fat_setattr()
558 if (attr->ia_valid & ATTR_CTIME) in fat_setattr()
559 fat_truncate_time(inode, &attr->ia_ctime, S_CTIME); in fat_setattr()
560 if (attr->ia_valid & ATTR_MTIME) in fat_setattr()
561 fat_truncate_time(inode, &attr->ia_mtime, S_MTIME); in fat_setattr()
562 attr->ia_valid &= ~(ATTR_ATIME|ATTR_CTIME|ATTR_MTIME); in fat_setattr()
564 setattr_copy(inode, attr); in fat_setattr()