Lines Matching full:dir

54 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
63 res = nilfs_inode_by_name(dir, &dentry->d_name, &ino);
69 inode = nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino);
71 nilfs_error(dir->i_sb,
88 static int nilfs_create(struct mnt_idmap *idmap, struct inode *dir,
95 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
98 inode = nilfs_new_inode(dir, mode);
108 err = nilfs_transaction_commit(dir->i_sb);
110 nilfs_transaction_abort(dir->i_sb);
116 nilfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
123 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
126 inode = nilfs_new_inode(dir, mode);
134 err = nilfs_transaction_commit(dir->i_sb);
136 nilfs_transaction_abort(dir->i_sb);
141 static int nilfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
145 struct super_block *sb = dir->i_sb;
153 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
157 inode = nilfs_new_inode(dir, S_IFLNK | 0777);
179 err = nilfs_transaction_commit(dir->i_sb);
181 nilfs_transaction_abort(dir->i_sb);
193 static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
200 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
211 err = nilfs_transaction_commit(dir->i_sb);
215 nilfs_transaction_abort(dir->i_sb);
221 static int nilfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
228 err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
232 inc_nlink(dir);
234 inode = nilfs_new_inode(dir, S_IFDIR | mode);
245 err = nilfs_make_empty(inode, dir);
257 err = nilfs_transaction_commit(dir->i_sb);
259 nilfs_transaction_abort(dir->i_sb);
270 drop_nlink(dir);
271 nilfs_mark_inode_dirty(dir);
275 static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)
282 de = nilfs_find_entry(dir, &dentry->d_name, &page);
303 inode_set_ctime_to_ts(inode, inode_get_ctime(dir));
310 static int nilfs_unlink(struct inode *dir, struct dentry *dentry)
315 err = nilfs_transaction_begin(dir->i_sb, &ti, 0);
319 err = nilfs_do_unlink(dir, dentry);
322 nilfs_mark_inode_dirty(dir);
324 err = nilfs_transaction_commit(dir->i_sb);
326 nilfs_transaction_abort(dir->i_sb);
331 static int nilfs_rmdir(struct inode *dir, struct dentry *dentry)
337 err = nilfs_transaction_begin(dir->i_sb, &ti, 0);
343 err = nilfs_do_unlink(dir, dentry);
348 drop_nlink(dir);
349 nilfs_mark_inode_dirty(dir);
353 err = nilfs_transaction_commit(dir->i_sb);
355 nilfs_transaction_abort(dir->i_sb);