Lines Matching refs:attr
162 struct iattr *attr) in setattr_prepare() argument
165 unsigned int ia_valid = attr->ia_valid; in setattr_prepare()
182 error = inode_newsize_ok(inode, attr->ia_size); in setattr_prepare()
193 !chown_ok(idmap, inode, attr->ia_vfsuid)) in setattr_prepare()
198 !chgrp_ok(idmap, inode, attr->ia_vfsgid)) in setattr_prepare()
209 vfsgid = attr->ia_vfsgid; in setattr_prepare()
215 attr->ia_mode &= ~S_ISGID; in setattr_prepare()
294 static void setattr_copy_mgtime(struct inode *inode, const struct iattr *attr) in setattr_copy_mgtime() argument
296 unsigned int ia_valid = attr->ia_valid; in setattr_copy_mgtime()
300 now = inode_set_ctime_deleg(inode, attr->ia_ctime); in setattr_copy_mgtime()
307 inode_set_atime_to_ts(inode, attr->ia_atime); in setattr_copy_mgtime()
312 inode_set_mtime_to_ts(inode, attr->ia_mtime); in setattr_copy_mgtime()
343 const struct iattr *attr) in setattr_copy() argument
345 unsigned int ia_valid = attr->ia_valid; in setattr_copy()
347 i_uid_update(idmap, attr, inode); in setattr_copy()
348 i_gid_update(idmap, attr, inode); in setattr_copy()
350 umode_t mode = attr->ia_mode; in setattr_copy()
358 return setattr_copy_mgtime(inode, attr); in setattr_copy()
361 inode_set_atime_to_ts(inode, attr->ia_atime); in setattr_copy()
363 inode_set_mtime_to_ts(inode, attr->ia_mtime); in setattr_copy()
366 inode_set_ctime_deleg(inode, attr->ia_ctime); in setattr_copy()
368 inode_set_ctime_to_ts(inode, attr->ia_ctime); in setattr_copy()
428 struct iattr *attr, struct delegated_inode *delegated_inode) in notify_change() argument
434 unsigned int ia_valid = attr->ia_valid; in notify_change()
461 if (is_sxid(attr->ia_mode)) in notify_change()
468 attr->ia_atime = timestamp_truncate(attr->ia_atime, inode); in notify_change()
470 attr->ia_atime = now; in notify_change()
472 attr->ia_ctime = timestamp_truncate(attr->ia_ctime, inode); in notify_change()
474 attr->ia_ctime = now; in notify_change()
476 attr->ia_mtime = timestamp_truncate(attr->ia_mtime, inode); in notify_change()
478 attr->ia_mtime = now; in notify_change()
485 ia_valid = attr->ia_valid &= ~ATTR_KILL_PRIV; in notify_change()
501 ia_valid = attr->ia_valid |= ATTR_MODE; in notify_change()
502 attr->ia_mode = (inode->i_mode & ~S_ISUID); in notify_change()
508 ia_valid = attr->ia_valid |= ATTR_MODE; in notify_change()
509 attr->ia_mode = inode->i_mode; in notify_change()
511 attr->ia_mode &= ~S_ISGID; in notify_change()
514 if (!(attr->ia_valid & ~(ATTR_KILL_SUID | ATTR_KILL_SGID))) in notify_change()
523 attr->ia_vfsuid)) in notify_change()
527 attr->ia_vfsgid)) in notify_change()
540 error = security_inode_setattr(idmap, dentry, attr); in notify_change()
556 error = inode->i_op->setattr(idmap, dentry, attr); in notify_change()
558 error = simple_setattr(idmap, dentry, attr); in notify_change()