Lines Matching full:dir

54 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)  in nilfs_lookup()  argument
63 res = nilfs_inode_by_name(dir, &dentry->d_name, &ino); in nilfs_lookup()
69 inode = nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino); in nilfs_lookup()
83 static int nilfs_create(struct mnt_idmap *idmap, struct inode *dir, in nilfs_create() argument
90 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_create()
93 inode = nilfs_new_inode(dir, mode); in nilfs_create()
103 err = nilfs_transaction_commit(dir->i_sb); in nilfs_create()
105 nilfs_transaction_abort(dir->i_sb); in nilfs_create()
111 nilfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in nilfs_mknod() argument
118 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_mknod()
121 inode = nilfs_new_inode(dir, mode); in nilfs_mknod()
129 err = nilfs_transaction_commit(dir->i_sb); in nilfs_mknod()
131 nilfs_transaction_abort(dir->i_sb); in nilfs_mknod()
136 static int nilfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in nilfs_symlink() argument
140 struct super_block *sb = dir->i_sb; in nilfs_symlink()
148 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_symlink()
152 inode = nilfs_new_inode(dir, S_IFLNK | 0777); in nilfs_symlink()
174 err = nilfs_transaction_commit(dir->i_sb); in nilfs_symlink()
176 nilfs_transaction_abort(dir->i_sb); in nilfs_symlink()
188 static int nilfs_link(struct dentry *old_dentry, struct inode *dir, in nilfs_link() argument
195 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_link()
206 err = nilfs_transaction_commit(dir->i_sb); in nilfs_link()
210 nilfs_transaction_abort(dir->i_sb); in nilfs_link()
216 static int nilfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in nilfs_mkdir() argument
223 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_mkdir()
227 inc_nlink(dir); in nilfs_mkdir()
229 inode = nilfs_new_inode(dir, S_IFDIR | mode); in nilfs_mkdir()
240 err = nilfs_make_empty(inode, dir); in nilfs_mkdir()
252 err = nilfs_transaction_commit(dir->i_sb); in nilfs_mkdir()
254 nilfs_transaction_abort(dir->i_sb); in nilfs_mkdir()
265 drop_nlink(dir); in nilfs_mkdir()
266 nilfs_mark_inode_dirty(dir); in nilfs_mkdir()
270 static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry) in nilfs_do_unlink() argument
277 de = nilfs_find_entry(dir, &dentry->d_name, &folio); in nilfs_do_unlink()
299 inode_set_ctime_to_ts(inode, inode_get_ctime(dir)); in nilfs_do_unlink()
306 static int nilfs_unlink(struct inode *dir, struct dentry *dentry) in nilfs_unlink() argument
311 err = nilfs_transaction_begin(dir->i_sb, &ti, 0); in nilfs_unlink()
315 err = nilfs_do_unlink(dir, dentry); in nilfs_unlink()
318 nilfs_mark_inode_dirty(dir); in nilfs_unlink()
320 err = nilfs_transaction_commit(dir->i_sb); in nilfs_unlink()
322 nilfs_transaction_abort(dir->i_sb); in nilfs_unlink()
327 static int nilfs_rmdir(struct inode *dir, struct dentry *dentry) in nilfs_rmdir() argument
333 err = nilfs_transaction_begin(dir->i_sb, &ti, 0); in nilfs_rmdir()
339 err = nilfs_do_unlink(dir, dentry); in nilfs_rmdir()
344 drop_nlink(dir); in nilfs_rmdir()
345 nilfs_mark_inode_dirty(dir); in nilfs_rmdir()
349 err = nilfs_transaction_commit(dir->i_sb); in nilfs_rmdir()
351 nilfs_transaction_abort(dir->i_sb); in nilfs_rmdir()