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