Lines Matching refs:dentry

31 static struct dentry *hypfs_create_update_file(struct dentry *dir);
36 struct dentry *update_file; /* file to trigger update */
46 static struct dentry *hypfs_last_dentry;
59 static void hypfs_add_dentry(struct dentry *dentry) in hypfs_add_dentry() argument
61 dentry->d_fsdata = hypfs_last_dentry; in hypfs_add_dentry()
62 hypfs_last_dentry = dentry; in hypfs_add_dentry()
65 static void hypfs_remove(struct dentry *dentry) in hypfs_remove() argument
67 struct dentry *parent; in hypfs_remove()
69 parent = dentry->d_parent; in hypfs_remove()
71 if (simple_positive(dentry)) { in hypfs_remove()
72 if (d_is_dir(dentry)) in hypfs_remove()
73 simple_rmdir(d_inode(parent), dentry); in hypfs_remove()
75 simple_unlink(d_inode(parent), dentry); in hypfs_remove()
77 d_delete(dentry); in hypfs_remove()
78 dput(dentry); in hypfs_remove()
82 static void hypfs_delete_tree(struct dentry *root) in hypfs_delete_tree()
85 struct dentry *next_dentry; in hypfs_delete_tree()
258 static int hypfs_show_options(struct seq_file *s, struct dentry *root) in hypfs_show_options()
270 struct dentry *root_dentry; in hypfs_fill_super()
309 static struct dentry *hypfs_mount(struct file_system_type *fst, int flags, in hypfs_mount()
328 static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, in hypfs_create_file()
331 struct dentry *dentry; in hypfs_create_file() local
335 dentry = lookup_one_len(name, parent, strlen(name)); in hypfs_create_file()
336 if (IS_ERR(dentry)) { in hypfs_create_file()
337 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
342 dput(dentry); in hypfs_create_file()
343 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
359 d_instantiate(dentry, inode); in hypfs_create_file()
360 dget(dentry); in hypfs_create_file()
363 return dentry; in hypfs_create_file()
366 struct dentry *hypfs_mkdir(struct dentry *parent, const char *name) in hypfs_mkdir()
368 struct dentry *dentry; in hypfs_mkdir() local
370 dentry = hypfs_create_file(parent, name, NULL, S_IFDIR | DIR_MODE); in hypfs_mkdir()
371 if (IS_ERR(dentry)) in hypfs_mkdir()
372 return dentry; in hypfs_mkdir()
373 hypfs_add_dentry(dentry); in hypfs_mkdir()
374 return dentry; in hypfs_mkdir()
377 static struct dentry *hypfs_create_update_file(struct dentry *dir) in hypfs_create_update_file()
379 struct dentry *dentry; in hypfs_create_update_file() local
381 dentry = hypfs_create_file(dir, "update", NULL, in hypfs_create_update_file()
388 return dentry; in hypfs_create_update_file()
391 struct dentry *hypfs_create_u64(struct dentry *dir, in hypfs_create_u64()
396 struct dentry *dentry; in hypfs_create_u64() local
402 dentry = in hypfs_create_u64()
404 if (IS_ERR(dentry)) { in hypfs_create_u64()
408 hypfs_add_dentry(dentry); in hypfs_create_u64()
409 return dentry; in hypfs_create_u64()
412 struct dentry *hypfs_create_str(struct dentry *dir, in hypfs_create_str()
416 struct dentry *dentry; in hypfs_create_str() local
422 dentry = in hypfs_create_str()
424 if (IS_ERR(dentry)) { in hypfs_create_str()
428 hypfs_add_dentry(dentry); in hypfs_create_str()
429 return dentry; in hypfs_create_str()