Lines Matching refs:inode

20 static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
25 struct inode *inode = NULL;
35 inode = ERR_PTR(res);
37 inode = hfs_iget(dir->i_sb, &fd.search_key->cat, &rec);
38 if (!inode)
39 inode = ERR_PTR(-EACCES);
42 return d_splice_alias(inode, dentry);
50 struct inode *inode = file_inode(file);
51 struct super_block *sb = inode->i_sb;
59 if (ctx->pos >= inode->i_size)
65 hfs_cat_build_key(sb, fd.search_key, inode->i_ino, NULL);
98 if (ctx->pos >= inode->i_size)
105 if (be32_to_cpu(fd.key->cat.ParID) != inode->i_ino) {
143 if (ctx->pos >= inode->i_size)
158 spin_lock(&HFS_I(inode)->open_dir_lock);
159 list_add(&rd->list, &HFS_I(inode)->open_dir_list);
160 spin_unlock(&HFS_I(inode)->open_dir_lock);
172 static int hfs_dir_release(struct inode *inode, struct file *file)
176 spin_lock(&HFS_I(inode)->open_dir_lock);
178 spin_unlock(&HFS_I(inode)->open_dir_lock);
189 * a directory and return a corresponding inode, given the inode for
192 static int hfs_create(struct mnt_idmap *idmap, struct inode *dir,
195 struct inode *inode;
198 inode = hfs_new_inode(dir, &dentry->d_name, mode);
199 if (!inode)
202 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
204 clear_nlink(inode);
205 hfs_delete_inode(inode);
206 iput(inode);
209 d_instantiate(dentry, inode);
210 mark_inode_dirty(inode);
219 * in a directory, given the inode for the parent directory and the
222 static int hfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
225 struct inode *inode;
228 inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode);
229 if (!inode)
232 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
234 clear_nlink(inode);
235 hfs_delete_inode(inode);
236 iput(inode);
239 d_instantiate(dentry, inode);
240 mark_inode_dirty(inode);
249 * an existing child, given the inode for the parent directory and
255 static int hfs_remove(struct inode *dir, struct dentry *dentry)
257 struct inode *inode = d_inode(dentry);
260 if (S_ISDIR(inode->i_mode) && inode->i_size != 2)
262 res = hfs_cat_delete(inode->i_ino, dir, &dentry->d_name);
265 clear_nlink(inode);
266 inode_set_ctime_current(inode);
267 hfs_delete_inode(inode);
268 mark_inode_dirty(inode);
277 * file or directory, given the inode for the current directory and
279 * inode for the new directory and the name (and its length) of the
283 static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
284 struct dentry *old_dentry, struct inode *new_dir,