Lines Matching refs:dentry
23 int simple_getattr(struct vfsmount *mnt, struct dentry *dentry, in simple_getattr() argument
26 struct inode *inode = d_inode(dentry); in simple_getattr()
33 int simple_statfs(struct dentry *dentry, struct kstatfs *buf) in simple_statfs() argument
35 buf->f_type = dentry->d_sb->s_magic; in simple_statfs()
46 int always_delete_dentry(const struct dentry *dentry) in always_delete_dentry() argument
61 struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in simple_lookup() argument
63 if (dentry->d_name.len > NAME_MAX) in simple_lookup()
65 if (!dentry->d_sb->s_d_op) in simple_lookup()
66 d_set_d_op(dentry, &simple_dentry_operations); in simple_lookup()
67 d_add(dentry, NULL); in simple_lookup()
76 file->private_data = d_alloc(file->f_path.dentry, &cursor_name); in dcache_dir_open()
91 struct dentry *dentry = file->f_path.dentry; in dcache_dir_lseek() local
92 mutex_lock(&d_inode(dentry)->i_mutex); in dcache_dir_lseek()
100 mutex_unlock(&d_inode(dentry)->i_mutex); in dcache_dir_lseek()
107 struct dentry *cursor = file->private_data; in dcache_dir_lseek()
110 spin_lock(&dentry->d_lock); in dcache_dir_lseek()
113 p = dentry->d_subdirs.next; in dcache_dir_lseek()
114 while (n && p != &dentry->d_subdirs) { in dcache_dir_lseek()
115 struct dentry *next; in dcache_dir_lseek()
116 next = list_entry(p, struct dentry, d_child); in dcache_dir_lseek()
124 spin_unlock(&dentry->d_lock); in dcache_dir_lseek()
127 mutex_unlock(&d_inode(dentry)->i_mutex); in dcache_dir_lseek()
146 struct dentry *dentry = file->f_path.dentry; in dcache_readdir() local
147 struct dentry *cursor = file->private_data; in dcache_readdir()
152 spin_lock(&dentry->d_lock); in dcache_readdir()
154 list_move(q, &dentry->d_subdirs); in dcache_readdir()
156 for (p = q->next; p != &dentry->d_subdirs; p = p->next) { in dcache_readdir()
157 struct dentry *next = list_entry(p, struct dentry, d_child); in dcache_readdir()
165 spin_unlock(&dentry->d_lock); in dcache_readdir()
169 spin_lock(&dentry->d_lock); in dcache_readdir()
177 spin_unlock(&dentry->d_lock); in dcache_readdir()
211 struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name, in mount_pseudo()
216 struct dentry *dentry; in mount_pseudo() local
241 dentry = __d_alloc(s, &d_name); in mount_pseudo()
242 if (!dentry) { in mount_pseudo()
246 d_instantiate(dentry, root); in mount_pseudo()
247 s->s_root = dentry; in mount_pseudo()
266 int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) in simple_link() argument
273 dget(dentry); in simple_link()
274 d_instantiate(dentry, inode); in simple_link()
279 int simple_empty(struct dentry *dentry) in simple_empty() argument
281 struct dentry *child; in simple_empty()
284 spin_lock(&dentry->d_lock); in simple_empty()
285 list_for_each_entry(child, &dentry->d_subdirs, d_child) { in simple_empty()
295 spin_unlock(&dentry->d_lock); in simple_empty()
300 int simple_unlink(struct inode *dir, struct dentry *dentry) in simple_unlink() argument
302 struct inode *inode = d_inode(dentry); in simple_unlink()
306 dput(dentry); in simple_unlink()
311 int simple_rmdir(struct inode *dir, struct dentry *dentry) in simple_rmdir() argument
313 if (!simple_empty(dentry)) in simple_rmdir()
316 drop_nlink(d_inode(dentry)); in simple_rmdir()
317 simple_unlink(dir, dentry); in simple_rmdir()
323 int simple_rename(struct inode *old_dir, struct dentry *old_dentry, in simple_rename()
324 struct inode *new_dir, struct dentry *new_dentry) in simple_rename()
364 int simple_setattr(struct dentry *dentry, struct iattr *iattr) in simple_setattr() argument
366 struct inode *inode = d_inode(dentry); in simple_setattr()
476 struct dentry *root; in simple_fill_super()
477 struct dentry *dentry; in simple_fill_super() local
512 dentry = d_alloc_name(root, files->name); in simple_fill_super()
513 if (!dentry) in simple_fill_super()
517 dput(dentry); in simple_fill_super()
524 d_add(dentry, inode); in simple_fill_super()
868 struct dentry *generic_fh_to_dentry(struct super_block *sb, struct fid *fid, in generic_fh_to_dentry()
901 struct dentry *generic_fh_to_parent(struct super_block *sb, struct fid *fid, in generic_fh_to_parent()
1095 const char *simple_follow_link(struct dentry *dentry, void **cookie) in simple_follow_link() argument
1097 return d_inode(dentry)->i_link; in simple_follow_link()
1110 static struct dentry *empty_dir_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in empty_dir_lookup() argument
1115 static int empty_dir_getattr(struct vfsmount *mnt, struct dentry *dentry, in empty_dir_getattr() argument
1118 struct inode *inode = d_inode(dentry); in empty_dir_getattr()
1123 static int empty_dir_setattr(struct dentry *dentry, struct iattr *attr) in empty_dir_setattr() argument
1128 static int empty_dir_setxattr(struct dentry *dentry, const char *name, in empty_dir_setxattr() argument
1134 static ssize_t empty_dir_getxattr(struct dentry *dentry, const char *name, in empty_dir_getxattr() argument
1140 static int empty_dir_removexattr(struct dentry *dentry, const char *name) in empty_dir_removexattr() argument
1145 static ssize_t empty_dir_listxattr(struct dentry *dentry, char *list, size_t size) in empty_dir_listxattr() argument