Lines Matching defs:dir

67 static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry,
70 struct ntfs_inode *ni = ntfs_i(dir);
85 inode = dir_search_u(dir, uni, NULL);
107 static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir,
110 return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFREG | mode, 0,
117 static int ntfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
120 return ntfs_create_inode(idmap, dir, dentry, NULL, mode, rdev, NULL, 0,
127 static int ntfs_link(struct dentry *ode, struct inode *dir, struct dentry *de)
139 ni_lock_dir(ntfs_i(dir));
140 if (inode != dir)
150 inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
152 mark_inode_dirty(dir);
159 if (inode != dir)
161 ni_unlock(ntfs_i(dir));
169 static int ntfs_unlink(struct inode *dir, struct dentry *dentry)
171 struct ntfs_inode *ni = ntfs_i(dir);
178 if (unlikely(ntfs3_forced_shutdown(dir->i_sb)))
183 err = ntfs_unlink_inode(dir, dentry);
193 static int ntfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
199 if (unlikely(is_bad_ni(ntfs_i(dir))))
202 if (unlikely(ntfs3_forced_shutdown(dir->i_sb)))
205 return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFLNK | 0777, 0,
212 static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
215 return ERR_PTR(ntfs_create_inode(idmap, dir, dentry, NULL,
222 static int ntfs_rmdir(struct inode *dir, struct dentry *dentry)
224 struct ntfs_inode *ni = ntfs_i(dir);
231 if (unlikely(ntfs3_forced_shutdown(dir->i_sb)))
236 err = ntfs_unlink_inode(dir, dentry);
246 static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir,
251 struct super_block *sb = dir->i_sb;
253 struct ntfs_inode *dir_ni = ntfs_i(dir);
285 if (is_same && dir == new_dir) {
334 simple_rename_timestamp(dir, dentry, new_dir, new_dentry);
336 mark_inode_dirty(dir);
337 if (dir != new_dir)
340 if (IS_DIRSYNC(dir))
341 ntfs_sync_inode(dir);