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 inline int hypfs_positive(struct dentry *dentry) in hypfs_positive() argument
67 return d_really_is_positive(dentry) && !d_unhashed(dentry); in hypfs_positive()
70 static void hypfs_remove(struct dentry *dentry) in hypfs_remove() argument
72 struct dentry *parent; in hypfs_remove()
74 parent = dentry->d_parent; in hypfs_remove()
76 if (hypfs_positive(dentry)) { in hypfs_remove()
77 if (d_is_dir(dentry)) in hypfs_remove()
78 simple_rmdir(d_inode(parent), dentry); in hypfs_remove()
80 simple_unlink(d_inode(parent), dentry); in hypfs_remove()
82 d_delete(dentry); in hypfs_remove()
83 dput(dentry); in hypfs_remove()
87 static void hypfs_delete_tree(struct dentry *root) in hypfs_delete_tree()
90 struct dentry *next_dentry; in hypfs_delete_tree()
263 static int hypfs_show_options(struct seq_file *s, struct dentry *root) in hypfs_show_options()
275 struct dentry *root_dentry; in hypfs_fill_super()
314 static struct dentry *hypfs_mount(struct file_system_type *fst, int flags, in hypfs_mount()
333 static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, in hypfs_create_file()
336 struct dentry *dentry; in hypfs_create_file() local
340 dentry = lookup_one_len(name, parent, strlen(name)); in hypfs_create_file()
341 if (IS_ERR(dentry)) { in hypfs_create_file()
342 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
347 dput(dentry); in hypfs_create_file()
348 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
364 d_instantiate(dentry, inode); in hypfs_create_file()
365 dget(dentry); in hypfs_create_file()
368 return dentry; in hypfs_create_file()
371 struct dentry *hypfs_mkdir(struct dentry *parent, const char *name) in hypfs_mkdir()
373 struct dentry *dentry; in hypfs_mkdir() local
375 dentry = hypfs_create_file(parent, name, NULL, S_IFDIR | DIR_MODE); in hypfs_mkdir()
376 if (IS_ERR(dentry)) in hypfs_mkdir()
377 return dentry; in hypfs_mkdir()
378 hypfs_add_dentry(dentry); in hypfs_mkdir()
379 return dentry; in hypfs_mkdir()
382 static struct dentry *hypfs_create_update_file(struct dentry *dir) in hypfs_create_update_file()
384 struct dentry *dentry; in hypfs_create_update_file() local
386 dentry = hypfs_create_file(dir, "update", NULL, in hypfs_create_update_file()
393 return dentry; in hypfs_create_update_file()
396 struct dentry *hypfs_create_u64(struct dentry *dir, in hypfs_create_u64()
401 struct dentry *dentry; in hypfs_create_u64() local
407 dentry = in hypfs_create_u64()
409 if (IS_ERR(dentry)) { in hypfs_create_u64()
413 hypfs_add_dentry(dentry); in hypfs_create_u64()
414 return dentry; in hypfs_create_u64()
417 struct dentry *hypfs_create_str(struct dentry *dir, in hypfs_create_str()
421 struct dentry *dentry; in hypfs_create_str() local
427 dentry = in hypfs_create_str()
429 if (IS_ERR(dentry)) { in hypfs_create_str()
433 hypfs_add_dentry(dentry); in hypfs_create_str()
434 return dentry; in hypfs_create_str()