Lines Matching refs:dentry

23 static inline int simple_positive(struct dentry *dentry)  in simple_positive()  argument
25 return d_really_is_positive(dentry) && !d_unhashed(dentry); in simple_positive()
28 int simple_getattr(struct vfsmount *mnt, struct dentry *dentry, in simple_getattr() argument
31 struct inode *inode = d_inode(dentry); in simple_getattr()
38 int simple_statfs(struct dentry *dentry, struct kstatfs *buf) in simple_statfs() argument
40 buf->f_type = dentry->d_sb->s_magic; in simple_statfs()
51 int always_delete_dentry(const struct dentry *dentry) in always_delete_dentry() argument
66 struct dentry *simple_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in simple_lookup() argument
68 if (dentry->d_name.len > NAME_MAX) in simple_lookup()
70 if (!dentry->d_sb->s_d_op) in simple_lookup()
71 d_set_d_op(dentry, &simple_dentry_operations); in simple_lookup()
72 d_add(dentry, NULL); in simple_lookup()
81 file->private_data = d_alloc(file->f_path.dentry, &cursor_name); in dcache_dir_open()
96 struct dentry *dentry = file->f_path.dentry; in dcache_dir_lseek() local
97 mutex_lock(&d_inode(dentry)->i_mutex); in dcache_dir_lseek()
105 mutex_unlock(&d_inode(dentry)->i_mutex); in dcache_dir_lseek()
112 struct dentry *cursor = file->private_data; in dcache_dir_lseek()
115 spin_lock(&dentry->d_lock); in dcache_dir_lseek()
118 p = dentry->d_subdirs.next; in dcache_dir_lseek()
119 while (n && p != &dentry->d_subdirs) { in dcache_dir_lseek()
120 struct dentry *next; in dcache_dir_lseek()
121 next = list_entry(p, struct dentry, d_child); in dcache_dir_lseek()
129 spin_unlock(&dentry->d_lock); in dcache_dir_lseek()
132 mutex_unlock(&d_inode(dentry)->i_mutex); in dcache_dir_lseek()
151 struct dentry *dentry = file->f_path.dentry; in dcache_readdir() local
152 struct dentry *cursor = file->private_data; in dcache_readdir()
157 spin_lock(&dentry->d_lock); in dcache_readdir()
159 list_move(q, &dentry->d_subdirs); in dcache_readdir()
161 for (p = q->next; p != &dentry->d_subdirs; p = p->next) { in dcache_readdir()
162 struct dentry *next = list_entry(p, struct dentry, d_child); in dcache_readdir()
170 spin_unlock(&dentry->d_lock); in dcache_readdir()
174 spin_lock(&dentry->d_lock); in dcache_readdir()
182 spin_unlock(&dentry->d_lock); in dcache_readdir()
216 struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name, in mount_pseudo()
221 struct dentry *dentry; in mount_pseudo() local
246 dentry = __d_alloc(s, &d_name); in mount_pseudo()
247 if (!dentry) { in mount_pseudo()
251 d_instantiate(dentry, root); in mount_pseudo()
252 s->s_root = dentry; in mount_pseudo()
271 int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) in simple_link() argument
278 dget(dentry); in simple_link()
279 d_instantiate(dentry, inode); in simple_link()
284 int simple_empty(struct dentry *dentry) in simple_empty() argument
286 struct dentry *child; in simple_empty()
289 spin_lock(&dentry->d_lock); in simple_empty()
290 list_for_each_entry(child, &dentry->d_subdirs, d_child) { in simple_empty()
300 spin_unlock(&dentry->d_lock); in simple_empty()
305 int simple_unlink(struct inode *dir, struct dentry *dentry) in simple_unlink() argument
307 struct inode *inode = d_inode(dentry); in simple_unlink()
311 dput(dentry); in simple_unlink()
316 int simple_rmdir(struct inode *dir, struct dentry *dentry) in simple_rmdir() argument
318 if (!simple_empty(dentry)) in simple_rmdir()
321 drop_nlink(d_inode(dentry)); in simple_rmdir()
322 simple_unlink(dir, dentry); in simple_rmdir()
328 int simple_rename(struct inode *old_dir, struct dentry *old_dentry, in simple_rename()
329 struct inode *new_dir, struct dentry *new_dentry) in simple_rename()
369 int simple_setattr(struct dentry *dentry, struct iattr *iattr) in simple_setattr() argument
371 struct inode *inode = d_inode(dentry); in simple_setattr()
481 struct dentry *root; in simple_fill_super()
482 struct dentry *dentry; in simple_fill_super() local
517 dentry = d_alloc_name(root, files->name); in simple_fill_super()
518 if (!dentry) in simple_fill_super()
522 dput(dentry); in simple_fill_super()
529 d_add(dentry, inode); in simple_fill_super()
873 struct dentry *generic_fh_to_dentry(struct super_block *sb, struct fid *fid, in generic_fh_to_dentry()
906 struct dentry *generic_fh_to_parent(struct super_block *sb, struct fid *fid, in generic_fh_to_parent()
1027 void kfree_put_link(struct dentry *dentry, struct nameidata *nd, in kfree_put_link() argument
1101 static struct dentry *empty_dir_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in empty_dir_lookup() argument
1106 static int empty_dir_getattr(struct vfsmount *mnt, struct dentry *dentry, in empty_dir_getattr() argument
1109 struct inode *inode = d_inode(dentry); in empty_dir_getattr()
1114 static int empty_dir_setattr(struct dentry *dentry, struct iattr *attr) in empty_dir_setattr() argument
1119 static int empty_dir_setxattr(struct dentry *dentry, const char *name, in empty_dir_setxattr() argument
1125 static ssize_t empty_dir_getxattr(struct dentry *dentry, const char *name, in empty_dir_getxattr() argument
1131 static int empty_dir_removexattr(struct dentry *dentry, const char *name) in empty_dir_removexattr() argument
1136 static ssize_t empty_dir_listxattr(struct dentry *dentry, char *list, size_t size) in empty_dir_listxattr() argument