Lines Matching refs:attr
788 static int hostfs_setattr(struct dentry *dentry, struct iattr *attr) in hostfs_setattr() argument
797 err = setattr_prepare(dentry, attr); in hostfs_setattr()
802 attr->ia_valid &= ~ATTR_SIZE; in hostfs_setattr()
805 if (attr->ia_valid & ATTR_MODE) { in hostfs_setattr()
807 attrs.ia_mode = attr->ia_mode; in hostfs_setattr()
809 if (attr->ia_valid & ATTR_UID) { in hostfs_setattr()
811 attrs.ia_uid = from_kuid(&init_user_ns, attr->ia_uid); in hostfs_setattr()
813 if (attr->ia_valid & ATTR_GID) { in hostfs_setattr()
815 attrs.ia_gid = from_kgid(&init_user_ns, attr->ia_gid); in hostfs_setattr()
817 if (attr->ia_valid & ATTR_SIZE) { in hostfs_setattr()
819 attrs.ia_size = attr->ia_size; in hostfs_setattr()
821 if (attr->ia_valid & ATTR_ATIME) { in hostfs_setattr()
823 attrs.ia_atime = timespec64_to_timespec(attr->ia_atime); in hostfs_setattr()
825 if (attr->ia_valid & ATTR_MTIME) { in hostfs_setattr()
827 attrs.ia_mtime = timespec64_to_timespec(attr->ia_mtime); in hostfs_setattr()
829 if (attr->ia_valid & ATTR_CTIME) { in hostfs_setattr()
831 attrs.ia_ctime = timespec64_to_timespec(attr->ia_ctime); in hostfs_setattr()
833 if (attr->ia_valid & ATTR_ATIME_SET) { in hostfs_setattr()
836 if (attr->ia_valid & ATTR_MTIME_SET) { in hostfs_setattr()
847 if ((attr->ia_valid & ATTR_SIZE) && in hostfs_setattr()
848 attr->ia_size != i_size_read(inode)) in hostfs_setattr()
849 truncate_setsize(inode, attr->ia_size); in hostfs_setattr()
851 setattr_copy(inode, attr); in hostfs_setattr()