Lines Matching refs:dentry

33 static struct dentry *hypfs_create_update_file(struct dentry *dir);
38 struct dentry *update_file; /* file to trigger update */
48 static struct dentry *hypfs_last_dentry;
61 static void hypfs_add_dentry(struct dentry *dentry) in hypfs_add_dentry() argument
63 dentry->d_fsdata = hypfs_last_dentry; in hypfs_add_dentry()
64 hypfs_last_dentry = dentry; in hypfs_add_dentry()
67 static void hypfs_remove(struct dentry *dentry) in hypfs_remove() argument
69 struct dentry *parent; in hypfs_remove()
71 parent = dentry->d_parent; in hypfs_remove()
73 if (simple_positive(dentry)) { in hypfs_remove()
74 if (d_is_dir(dentry)) in hypfs_remove()
75 simple_rmdir(d_inode(parent), dentry); in hypfs_remove()
77 simple_unlink(d_inode(parent), dentry); in hypfs_remove()
79 d_drop(dentry); in hypfs_remove()
80 dput(dentry); in hypfs_remove()
84 static void hypfs_delete_tree(struct dentry *root) in hypfs_delete_tree()
87 struct dentry *next_dentry; in hypfs_delete_tree()
247 static int hypfs_show_options(struct seq_file *s, struct dentry *root) in hypfs_show_options()
260 struct dentry *root_dentry, *update_file; in hypfs_fill_super()
337 static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, in hypfs_create_file()
340 struct dentry *dentry; in hypfs_create_file() local
344 dentry = lookup_one_len(name, parent, strlen(name)); in hypfs_create_file()
345 if (IS_ERR(dentry)) { in hypfs_create_file()
346 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
351 dput(dentry); in hypfs_create_file()
352 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
368 d_instantiate(dentry, inode); in hypfs_create_file()
369 dget(dentry); in hypfs_create_file()
372 return dentry; in hypfs_create_file()
375 struct dentry *hypfs_mkdir(struct dentry *parent, const char *name) in hypfs_mkdir()
377 struct dentry *dentry; in hypfs_mkdir() local
379 dentry = hypfs_create_file(parent, name, NULL, S_IFDIR | DIR_MODE); in hypfs_mkdir()
380 if (IS_ERR(dentry)) in hypfs_mkdir()
381 return dentry; in hypfs_mkdir()
382 hypfs_add_dentry(dentry); in hypfs_mkdir()
383 return dentry; in hypfs_mkdir()
386 static struct dentry *hypfs_create_update_file(struct dentry *dir) in hypfs_create_update_file()
388 struct dentry *dentry; in hypfs_create_update_file() local
390 dentry = hypfs_create_file(dir, "update", NULL, in hypfs_create_update_file()
397 return dentry; in hypfs_create_update_file()
400 struct dentry *hypfs_create_u64(struct dentry *dir, in hypfs_create_u64()
405 struct dentry *dentry; in hypfs_create_u64() local
411 dentry = in hypfs_create_u64()
413 if (IS_ERR(dentry)) { in hypfs_create_u64()
417 hypfs_add_dentry(dentry); in hypfs_create_u64()
418 return dentry; in hypfs_create_u64()
421 struct dentry *hypfs_create_str(struct dentry *dir, in hypfs_create_str()
425 struct dentry *dentry; in hypfs_create_str() local
431 dentry = in hypfs_create_str()
433 if (IS_ERR(dentry)) { in hypfs_create_str()
437 hypfs_add_dentry(dentry); in hypfs_create_str()
438 return dentry; in hypfs_create_str()