Lines Matching refs:attr

114 static int __hfs_notify_change(struct dentry *dentry, struct iattr * attr, int kind)  in __hfs_notify_change()  argument
122 error = inode_change_ok(inode, attr); /* basic permission checks */ in __hfs_notify_change()
126 (attr->ia_valid == (ATTR_MODE | ATTR_CTIME))) { in __hfs_notify_change()
134 if (((attr->ia_valid & ATTR_UID) && in __hfs_notify_change()
135 (attr->ia_uid != hsb->s_uid)) || in __hfs_notify_change()
136 ((attr->ia_valid & ATTR_GID) && in __hfs_notify_change()
137 (attr->ia_gid != hsb->s_gid)) || in __hfs_notify_change()
138 ((attr->ia_valid & ATTR_MODE) && in __hfs_notify_change()
140 (attr->ia_mode != inode->i_mode))|| in __hfs_notify_change()
141 (attr->ia_mode & ~HFS_VALID_MODE_BITS)))) { in __hfs_notify_change()
146 attr->ia_valid &= ~ATTR_MODE; in __hfs_notify_change()
147 } else if (attr->ia_valid & ATTR_MODE) { in __hfs_notify_change()
149 if (attr->ia_mode & S_IWUSR) { in __hfs_notify_change()
150 attr->ia_mode = inode->i_mode | S_IWUGO; in __hfs_notify_change()
152 attr->ia_mode = inode->i_mode & ~S_IWUGO; in __hfs_notify_change()
154 attr->ia_mode &= ~hsb->s_umask; in __hfs_notify_change()
160 if (attr->ia_valid & ATTR_SIZE) { in __hfs_notify_change()
162 inode->i_size = attr->ia_size; in __hfs_notify_change()
166 attr->ia_valid &= ~ATTR_SIZE; in __hfs_notify_change()
168 hdr_truncate(inode, attr->ia_size); in __hfs_notify_change()
169 attr->ia_valid &= ~ATTR_SIZE; in __hfs_notify_change()
172 error = inode_setattr(inode, attr); in __hfs_notify_change()
177 attr->ia_valid &= ~ATTR_SIZE; in __hfs_notify_change()
182 inode_setattr(de[i]->d_inode, attr); in __hfs_notify_change()
187 if (attr->ia_valid & ATTR_MTIME) { in __hfs_notify_change()
191 if (attr->ia_valid & ATTR_MODE) { in __hfs_notify_change()
210 int hfs_notify_change(struct dentry *dentry, struct iattr * attr) in hfs_notify_change() argument
212 return __hfs_notify_change(dentry, attr, HFS_NORM); in hfs_notify_change()
215 int hfs_notify_change_cap(struct dentry *dentry, struct iattr * attr) in hfs_notify_change_cap() argument
217 return __hfs_notify_change(dentry, attr, HFS_CAP); in hfs_notify_change_cap()
220 int hfs_notify_change_hdr(struct dentry *dentry, struct iattr * attr) in hfs_notify_change_hdr() argument
222 return __hfs_notify_change(dentry, attr, HFS_HDR); in hfs_notify_change_hdr()