Lines Matching refs:inode
170 affs_find_entry(struct inode *dir, struct dentry *dentry)
199 affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
203 struct inode *inode = NULL;
226 inode = affs_iget(sb, ino);
228 res = d_splice_alias(inode, dentry);
236 affs_unlink(struct inode *dir, struct dentry *dentry)
245 affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
248 struct inode *inode;
254 inode = affs_new_inode(dir);
255 if (!inode)
258 inode->i_mode = mode;
259 affs_mode_to_prot(inode);
260 mark_inode_dirty(inode);
262 inode->i_op = &affs_file_inode_operations;
263 inode->i_fop = &affs_file_operations;
264 inode->i_mapping->a_ops = affs_test_opt(AFFS_SB(sb)->s_flags, SF_OFS) ?
266 error = affs_add_entry(dir, inode, dentry, ST_FILE);
268 clear_nlink(inode);
269 iput(inode);
276 affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
278 struct inode *inode;
284 inode = affs_new_inode(dir);
285 if (!inode)
288 inode->i_mode = S_IFDIR | mode;
289 affs_mode_to_prot(inode);
291 inode->i_op = &affs_dir_inode_operations;
292 inode->i_fop = &affs_dir_operations;
294 error = affs_add_entry(dir, inode, dentry, ST_USERDIR);
296 clear_nlink(inode);
297 mark_inode_dirty(inode);
298 iput(inode);
305 affs_rmdir(struct inode *dir, struct dentry *dentry)
314 affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
318 struct inode *inode;
327 inode = affs_new_inode(dir);
328 if (!inode)
331 inode->i_op = &affs_symlink_inode_operations;
332 inode_nohighmem(inode);
333 inode->i_data.a_ops = &affs_symlink_aops;
334 inode->i_mode = S_IFLNK | 0777;
335 affs_mode_to_prot(inode);
338 bh = affs_bread(sb, inode->i_ino);
372 inode->i_size = i + 1;
373 mark_buffer_dirty_inode(bh, inode);
375 mark_inode_dirty(inode);
377 error = affs_add_entry(dir, inode, dentry, ST_SOFTLINK);
384 clear_nlink(inode);
385 mark_inode_dirty(inode);
386 iput(inode);
391 affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
393 struct inode *inode = d_inode(old_dentry);
395 pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino,
398 return affs_add_entry(dir, inode, dentry, ST_LINKFILE);
402 affs_rename(struct inode *old_dir, struct dentry *old_dentry,
403 struct inode *new_dir, struct dentry *new_dentry)
449 affs_xrename(struct inode *old_dir, struct dentry *old_dentry,
450 struct inode *new_dir, struct dentry *new_dentry)
503 int affs_rename2(struct inode *old_dir, struct dentry *old_dentry,
504 struct inode *new_dir, struct dentry *new_dentry,
522 struct inode *parent;
538 static struct inode *affs_nfs_get_inode(struct super_block *sb, u64 ino,
541 struct inode *inode;
546 inode = affs_iget(sb, ino);
547 if (IS_ERR(inode))
548 return ERR_CAST(inode);
550 return inode;