Lines Matching full:dir
72 static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry, in ntfs_lookup() argument
75 struct ntfs_inode *ni = ntfs_i(dir); in ntfs_lookup()
93 inode = dir_search_flags(dir, uni, NULL, flags); in ntfs_lookup()
114 static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir, in ntfs_create() argument
117 return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFREG | mode, 0, in ntfs_create()
124 static int ntfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in ntfs_mknod() argument
127 return ntfs_create_inode(idmap, dir, dentry, NULL, mode, rdev, NULL, 0, in ntfs_mknod()
134 static int ntfs_link(struct dentry *ode, struct inode *dir, struct dentry *de) in ntfs_link() argument
146 ni_lock_dir(ntfs_i(dir)); in ntfs_link()
147 if (inode != dir) in ntfs_link()
157 inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); in ntfs_link()
159 mark_inode_dirty(dir); in ntfs_link()
166 if (inode != dir) in ntfs_link()
168 ni_unlock(ntfs_i(dir)); in ntfs_link()
176 static int ntfs_unlink(struct inode *dir, struct dentry *dentry) in ntfs_unlink() argument
178 struct ntfs_inode *dir_ni = ntfs_i(dir); in ntfs_unlink()
187 if (unlikely(ntfs3_forced_shutdown(dir->i_sb))) in ntfs_unlink()
192 /* Remove general file/dir. */ in ntfs_unlink()
193 err = ntfs_unlink_inode(dir, dentry); in ntfs_unlink()
212 static int ntfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in ntfs_symlink() argument
218 if (unlikely(is_bad_ni(ntfs_i(dir)))) in ntfs_symlink()
221 if (unlikely(ntfs3_forced_shutdown(dir->i_sb))) in ntfs_symlink()
224 return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFLNK | 0777, 0, in ntfs_symlink()
231 static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in ntfs_mkdir() argument
234 return ERR_PTR(ntfs_create_inode(idmap, dir, dentry, NULL, in ntfs_mkdir()
241 static int ntfs_rmdir(struct inode *dir, struct dentry *dentry) in ntfs_rmdir() argument
243 struct ntfs_inode *ni = ntfs_i(dir); in ntfs_rmdir()
250 if (unlikely(ntfs3_forced_shutdown(dir->i_sb))) in ntfs_rmdir()
255 err = ntfs_unlink_inode(dir, dentry); in ntfs_rmdir()
265 static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir, in ntfs_rename() argument
270 struct super_block *sb = dir->i_sb; in ntfs_rename()
272 struct ntfs_inode *dir_ni = ntfs_i(dir); in ntfs_rename()
309 if (is_same && dir == new_dir) { in ntfs_rename()
357 simple_rename_timestamp(dir, dentry, new_dir, new_dentry); in ntfs_rename()
359 mark_inode_dirty(dir); in ntfs_rename()
360 if (dir != new_dir) in ntfs_rename()
363 if (IS_DIRSYNC(dir)) in ntfs_rename()
364 ntfs_sync_inode(dir); in ntfs_rename()