Lines Matching refs:attr
61 int setattr_prepare(struct dentry *dentry, struct iattr *attr) in setattr_prepare() argument
64 unsigned int ia_valid = attr->ia_valid; in setattr_prepare()
71 int error = inode_newsize_ok(inode, attr->ia_size); in setattr_prepare()
81 if ((ia_valid & ATTR_UID) && !chown_ok(inode, attr->ia_uid)) in setattr_prepare()
85 if ((ia_valid & ATTR_GID) && !chgrp_ok(inode, attr->ia_gid)) in setattr_prepare()
93 if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid : in setattr_prepare()
96 attr->ia_mode &= ~S_ISGID; in setattr_prepare()
178 void setattr_copy(struct inode *inode, const struct iattr *attr) in setattr_copy() argument
180 unsigned int ia_valid = attr->ia_valid; in setattr_copy()
183 inode->i_uid = attr->ia_uid; in setattr_copy()
185 inode->i_gid = attr->ia_gid; in setattr_copy()
187 inode->i_atime = timestamp_truncate(attr->ia_atime, in setattr_copy()
191 inode->i_mtime = timestamp_truncate(attr->ia_mtime, in setattr_copy()
195 inode->i_ctime = timestamp_truncate(attr->ia_ctime, in setattr_copy()
199 umode_t mode = attr->ia_mode; in setattr_copy()
229 int notify_change2(struct vfsmount *mnt, struct dentry * dentry, struct iattr * attr, struct inode … in notify_change2() argument
235 unsigned int ia_valid = attr->ia_valid; in notify_change2()
260 umode_t amode = attr->ia_mode; in notify_change2()
268 attr->ia_ctime = now; in notify_change2()
270 attr->ia_atime = now; in notify_change2()
272 attr->ia_mtime = now; in notify_change2()
278 ia_valid = attr->ia_valid &= ~ATTR_KILL_PRIV; in notify_change2()
294 ia_valid = attr->ia_valid |= ATTR_MODE; in notify_change2()
295 attr->ia_mode = (inode->i_mode & ~S_ISUID); in notify_change2()
301 ia_valid = attr->ia_valid |= ATTR_MODE; in notify_change2()
302 attr->ia_mode = inode->i_mode; in notify_change2()
304 attr->ia_mode &= ~S_ISGID; in notify_change2()
307 if (!(attr->ia_valid & ~(ATTR_KILL_SUID | ATTR_KILL_SGID))) in notify_change2()
315 !kuid_has_mapping(inode->i_sb->s_user_ns, attr->ia_uid)) in notify_change2()
318 !kgid_has_mapping(inode->i_sb->s_user_ns, attr->ia_gid)) in notify_change2()
329 error = security_inode_setattr(dentry, attr); in notify_change2()
337 error = inode->i_op->setattr2(mnt, dentry, attr); in notify_change2()
339 error = inode->i_op->setattr(dentry, attr); in notify_change2()
341 error = simple_setattr(dentry, attr); in notify_change2()
353 int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode) in notify_change() argument
355 return notify_change2(NULL, dentry, attr, delegated_inode); in notify_change()