Lines Matching refs:attr
19 int inode_change_ok(struct inode *inode, struct iattr *attr) in inode_change_ok() argument
22 unsigned int ia_valid = attr->ia_valid; in inode_change_ok()
31 attr->ia_uid != inode->i_uid) && !capable(CAP_CHOWN)) in inode_change_ok()
37 (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) && in inode_change_ok()
46 if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : in inode_change_ok()
48 attr->ia_mode &= ~S_ISGID; in inode_change_ok()
62 int inode_setattr(struct inode * inode, struct iattr * attr) in inode_setattr() argument
64 unsigned int ia_valid = attr->ia_valid; in inode_setattr()
68 error = vmtruncate(inode, attr->ia_size); in inode_setattr()
74 inode->i_uid = attr->ia_uid; in inode_setattr()
76 inode->i_gid = attr->ia_gid; in inode_setattr()
78 inode->i_atime = attr->ia_atime; in inode_setattr()
80 inode->i_mtime = attr->ia_mtime; in inode_setattr()
82 inode->i_ctime = attr->ia_ctime; in inode_setattr()
84 inode->i_mode = attr->ia_mode; in inode_setattr()
115 int notify_change(struct dentry * dentry, struct iattr * attr) in notify_change() argument
120 unsigned int ia_valid = attr->ia_valid; in notify_change()
125 attr->ia_ctime = now; in notify_change()
127 attr->ia_atime = now; in notify_change()
129 attr->ia_mtime = now; in notify_change()
133 error = inode->i_op->setattr(dentry, attr); in notify_change()
135 error = inode_change_ok(inode, attr); in notify_change()
137 if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || in notify_change()
138 (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) in notify_change()
139 error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0; in notify_change()
141 error = inode_setattr(inode, attr); in notify_change()