Lines Matching refs:dentry

34 static struct dentry *hypfs_create_update_file(struct dentry *dir);
39 struct dentry *update_file; /* file to trigger update */
49 static struct dentry *hypfs_last_dentry;
62 static void hypfs_add_dentry(struct dentry *dentry) in hypfs_add_dentry() argument
64 dentry->d_fsdata = hypfs_last_dentry; in hypfs_add_dentry()
65 hypfs_last_dentry = dentry; in hypfs_add_dentry()
68 static void hypfs_remove(struct dentry *dentry) in hypfs_remove() argument
70 struct dentry *parent; in hypfs_remove()
72 parent = dentry->d_parent; in hypfs_remove()
74 if (simple_positive(dentry)) { in hypfs_remove()
75 if (d_is_dir(dentry)) in hypfs_remove()
76 simple_rmdir(d_inode(parent), dentry); in hypfs_remove()
78 simple_unlink(d_inode(parent), dentry); in hypfs_remove()
80 d_drop(dentry); in hypfs_remove()
81 dput(dentry); in hypfs_remove()
85 static void hypfs_delete_tree(struct dentry *root) in hypfs_delete_tree()
88 struct dentry *next_dentry; in hypfs_delete_tree()
248 static int hypfs_show_options(struct seq_file *s, struct dentry *root) in hypfs_show_options()
261 struct dentry *root_dentry, *update_file; in hypfs_fill_super()
338 static struct dentry *hypfs_create_file(struct dentry *parent, const char *name, in hypfs_create_file()
341 struct dentry *dentry; in hypfs_create_file() local
345 dentry = lookup_noperm(&QSTR(name), parent); in hypfs_create_file()
346 if (IS_ERR(dentry)) { in hypfs_create_file()
347 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
352 dput(dentry); in hypfs_create_file()
353 dentry = ERR_PTR(-ENOMEM); in hypfs_create_file()
369 d_instantiate(dentry, inode); in hypfs_create_file()
370 dget(dentry); in hypfs_create_file()
373 return dentry; in hypfs_create_file()
376 struct dentry *hypfs_mkdir(struct dentry *parent, const char *name) in hypfs_mkdir()
378 struct dentry *dentry; in hypfs_mkdir() local
380 dentry = hypfs_create_file(parent, name, NULL, S_IFDIR | DIR_MODE); in hypfs_mkdir()
381 if (IS_ERR(dentry)) in hypfs_mkdir()
382 return dentry; in hypfs_mkdir()
383 hypfs_add_dentry(dentry); in hypfs_mkdir()
384 return dentry; in hypfs_mkdir()
387 static struct dentry *hypfs_create_update_file(struct dentry *dir) in hypfs_create_update_file()
389 struct dentry *dentry; in hypfs_create_update_file() local
391 dentry = hypfs_create_file(dir, "update", NULL, in hypfs_create_update_file()
398 return dentry; in hypfs_create_update_file()
401 struct dentry *hypfs_create_u64(struct dentry *dir, in hypfs_create_u64()
406 struct dentry *dentry; in hypfs_create_u64() local
412 dentry = in hypfs_create_u64()
414 if (IS_ERR(dentry)) { in hypfs_create_u64()
418 hypfs_add_dentry(dentry); in hypfs_create_u64()
419 return dentry; in hypfs_create_u64()
422 struct dentry *hypfs_create_str(struct dentry *dir, in hypfs_create_str()
426 struct dentry *dentry; in hypfs_create_str() local
432 dentry = in hypfs_create_str()
434 if (IS_ERR(dentry)) { in hypfs_create_str()
438 hypfs_add_dentry(dentry); in hypfs_create_str()
439 return dentry; in hypfs_create_str()