Lines Matching refs:attr

31 int inode_change_ok(const struct inode *inode, struct iattr *attr)  in inode_change_ok()  argument
33 unsigned int ia_valid = attr->ia_valid; in inode_change_ok()
40 int error = inode_newsize_ok(inode, attr->ia_size); in inode_change_ok()
52 !uid_eq(attr->ia_uid, inode->i_uid)) && in inode_change_ok()
59 (!in_group_p(attr->ia_gid) && !gid_eq(attr->ia_gid, inode->i_gid))) && in inode_change_ok()
68 if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : in inode_change_ok()
71 attr->ia_mode &= ~S_ISGID; in inode_change_ok()
142 void setattr_copy(struct inode *inode, const struct iattr *attr) in setattr_copy() argument
144 unsigned int ia_valid = attr->ia_valid; in setattr_copy()
147 inode->i_uid = attr->ia_uid; in setattr_copy()
149 inode->i_gid = attr->ia_gid; in setattr_copy()
151 inode->i_atime = timespec_trunc(attr->ia_atime, in setattr_copy()
154 inode->i_mtime = timespec_trunc(attr->ia_mtime, in setattr_copy()
157 inode->i_ctime = timespec_trunc(attr->ia_ctime, in setattr_copy()
160 umode_t mode = attr->ia_mode; in setattr_copy()
190 int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode) in notify_change() argument
196 unsigned int ia_valid = attr->ia_valid; in notify_change()
206 umode_t amode = attr->ia_mode; in notify_change()
214 attr->ia_ctime = now; in notify_change()
216 attr->ia_atime = now; in notify_change()
218 attr->ia_mtime = now; in notify_change()
220 attr->ia_valid &= ~ATTR_KILL_PRIV; in notify_change()
242 ia_valid = attr->ia_valid |= ATTR_MODE; in notify_change()
243 attr->ia_mode = (inode->i_mode & ~S_ISUID); in notify_change()
249 ia_valid = attr->ia_valid |= ATTR_MODE; in notify_change()
250 attr->ia_mode = inode->i_mode; in notify_change()
252 attr->ia_mode &= ~S_ISGID; in notify_change()
255 if (!(attr->ia_valid & ~(ATTR_KILL_SUID | ATTR_KILL_SGID))) in notify_change()
258 error = security_inode_setattr(dentry, attr); in notify_change()
266 error = inode->i_op->setattr(dentry, attr); in notify_change()
268 error = simple_setattr(dentry, attr); in notify_change()