Lines Matching refs:dir
54 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in nilfs_lookup() argument
62 ino = nilfs_inode_by_name(dir, &dentry->d_name); in nilfs_lookup()
63 inode = ino ? nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino) : NULL; in nilfs_lookup()
75 static int nilfs_create(struct mnt_idmap *idmap, struct inode *dir, in nilfs_create() argument
82 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_create()
85 inode = nilfs_new_inode(dir, mode); in nilfs_create()
95 err = nilfs_transaction_commit(dir->i_sb); in nilfs_create()
97 nilfs_transaction_abort(dir->i_sb); in nilfs_create()
103 nilfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in nilfs_mknod() argument
110 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_mknod()
113 inode = nilfs_new_inode(dir, mode); in nilfs_mknod()
121 err = nilfs_transaction_commit(dir->i_sb); in nilfs_mknod()
123 nilfs_transaction_abort(dir->i_sb); in nilfs_mknod()
128 static int nilfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in nilfs_symlink() argument
132 struct super_block *sb = dir->i_sb; in nilfs_symlink()
140 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_symlink()
144 inode = nilfs_new_inode(dir, S_IFLNK | 0777); in nilfs_symlink()
163 err = nilfs_transaction_commit(dir->i_sb); in nilfs_symlink()
165 nilfs_transaction_abort(dir->i_sb); in nilfs_symlink()
177 static int nilfs_link(struct dentry *old_dentry, struct inode *dir, in nilfs_link() argument
184 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_link()
195 err = nilfs_transaction_commit(dir->i_sb); in nilfs_link()
199 nilfs_transaction_abort(dir->i_sb); in nilfs_link()
205 static int nilfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in nilfs_mkdir() argument
212 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_mkdir()
216 inc_nlink(dir); in nilfs_mkdir()
218 inode = nilfs_new_inode(dir, S_IFDIR | mode); in nilfs_mkdir()
229 err = nilfs_make_empty(inode, dir); in nilfs_mkdir()
241 err = nilfs_transaction_commit(dir->i_sb); in nilfs_mkdir()
243 nilfs_transaction_abort(dir->i_sb); in nilfs_mkdir()
254 drop_nlink(dir); in nilfs_mkdir()
255 nilfs_mark_inode_dirty(dir); in nilfs_mkdir()
259 static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry) in nilfs_do_unlink() argument
267 de = nilfs_find_entry(dir, &dentry->d_name, &page); in nilfs_do_unlink()
286 inode_set_ctime_to_ts(inode, inode_get_ctime(dir)); in nilfs_do_unlink()
293 static int nilfs_unlink(struct inode *dir, struct dentry *dentry) in nilfs_unlink() argument
298 err = nilfs_transaction_begin(dir->i_sb, &ti, 0); in nilfs_unlink()
302 err = nilfs_do_unlink(dir, dentry); in nilfs_unlink()
305 nilfs_mark_inode_dirty(dir); in nilfs_unlink()
307 err = nilfs_transaction_commit(dir->i_sb); in nilfs_unlink()
309 nilfs_transaction_abort(dir->i_sb); in nilfs_unlink()
314 static int nilfs_rmdir(struct inode *dir, struct dentry *dentry) in nilfs_rmdir() argument
320 err = nilfs_transaction_begin(dir->i_sb, &ti, 0); in nilfs_rmdir()
326 err = nilfs_do_unlink(dir, dentry); in nilfs_rmdir()
331 drop_nlink(dir); in nilfs_rmdir()
332 nilfs_mark_inode_dirty(dir); in nilfs_rmdir()
336 err = nilfs_transaction_commit(dir->i_sb); in nilfs_rmdir()
338 nilfs_transaction_abort(dir->i_sb); in nilfs_rmdir()