• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/

Lines Matching defs:attr

2  *  linux/fs/attr.c
20 * @attr: attributes to change
22 * Check if we are allowed to change the attributes contained in @attr
29 int inode_change_ok(const struct inode *inode, struct iattr *attr)
31 unsigned int ia_valid = attr->ia_valid;
38 int error = inode_newsize_ok(inode, attr->ia_size);
50 attr->ia_uid != inode->i_uid) && !capable(CAP_CHOWN))
56 (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
65 if (!in_group_p((ia_valid & ATTR_GID) ? attr->ia_gid :
67 attr->ia_mode &= ~S_ISGID;
126 * @attr: the new attributes
131 * in attr. Noticably missing is inode size update, which is more complex
138 void setattr_copy(struct inode *inode, const struct iattr *attr)
140 unsigned int ia_valid = attr->ia_valid;
143 inode->i_uid = attr->ia_uid;
145 inode->i_gid = attr->ia_gid;
147 inode->i_atime = timespec_trunc(attr->ia_atime,
150 inode->i_mtime = timespec_trunc(attr->ia_mtime,
153 inode->i_ctime = timespec_trunc(attr->ia_ctime,
156 umode_t mode = attr->ia_mode;
165 int notify_change(struct dentry * dentry, struct iattr * attr)
171 unsigned int ia_valid = attr->ia_valid;
180 attr->ia_ctime = now;
182 attr->ia_atime = now;
184 attr->ia_mtime = now;
186 attr->ia_valid &= ~ATTR_KILL_PRIV;
208 ia_valid = attr->ia_valid |= ATTR_MODE;
209 attr->ia_mode = (inode->i_mode & ~S_ISUID);
215 ia_valid = attr->ia_valid |= ATTR_MODE;
216 attr->ia_mode = inode->i_mode;
218 attr->ia_mode &= ~S_ISGID;
221 if (!(attr->ia_valid & ~(ATTR_KILL_SUID | ATTR_KILL_SGID)))
224 error = security_inode_setattr(dentry, attr);
232 error = inode->i_op->setattr(dentry, attr);
234 error = simple_setattr(dentry, attr);