Lines Matching refs:dentry
104 struct dentry *dentry, *root; in binderfs_binder_device_create() local
176 dentry = lookup_one_len(name, root, name_len); in binderfs_binder_device_create()
177 if (IS_ERR(dentry)) { in binderfs_binder_device_create()
179 ret = PTR_ERR(dentry); in binderfs_binder_device_create()
183 if (d_really_is_positive(dentry)) { in binderfs_binder_device_create()
185 dput(dentry); in binderfs_binder_device_create()
192 d_instantiate(dentry, inode); in binderfs_binder_device_create()
193 fsnotify_create(root->d_inode, dentry); in binderfs_binder_device_create()
337 static int binderfs_show_mount_opts(struct seq_file *seq, struct dentry *root) in binderfs_show_mount_opts()
357 static inline bool is_binderfs_control_device(const struct dentry *dentry) in is_binderfs_control_device() argument
359 struct binderfs_info *info = dentry->d_sb->s_fs_info; in is_binderfs_control_device()
360 return info->control_dentry == dentry; in is_binderfs_control_device()
363 static int binderfs_rename(struct inode *old_dir, struct dentry *old_dentry, in binderfs_rename()
364 struct inode *new_dir, struct dentry *new_dentry, in binderfs_rename()
374 static int binderfs_unlink(struct inode *dir, struct dentry *dentry) in binderfs_unlink() argument
376 if (is_binderfs_control_device(dentry)) in binderfs_unlink()
379 return simple_unlink(dir, dentry); in binderfs_unlink()
402 struct dentry *dentry; in binderfs_binder_ctl_create() local
405 struct dentry *root = sb->s_root; in binderfs_binder_ctl_create()
451 dentry = d_alloc_name(root, "binder-control"); in binderfs_binder_ctl_create()
452 if (!dentry) in binderfs_binder_ctl_create()
456 info->control_dentry = dentry; in binderfs_binder_ctl_create()
457 d_add(dentry, inode); in binderfs_binder_ctl_create()
487 static struct dentry *binderfs_create_dentry(struct dentry *parent, in binderfs_create_dentry()
490 struct dentry *dentry; in binderfs_create_dentry() local
492 dentry = lookup_one_len(name, parent, strlen(name)); in binderfs_create_dentry()
493 if (IS_ERR(dentry)) in binderfs_create_dentry()
494 return dentry; in binderfs_create_dentry()
497 if (d_really_is_positive(dentry)) { in binderfs_create_dentry()
498 dput(dentry); in binderfs_create_dentry()
502 return dentry; in binderfs_create_dentry()
505 void binderfs_remove_file(struct dentry *dentry) in binderfs_remove_file() argument
509 parent_inode = d_inode(dentry->d_parent); in binderfs_remove_file()
511 if (simple_positive(dentry)) { in binderfs_remove_file()
512 dget(dentry); in binderfs_remove_file()
513 simple_unlink(parent_inode, dentry); in binderfs_remove_file()
514 d_delete(dentry); in binderfs_remove_file()
515 dput(dentry); in binderfs_remove_file()
520 struct dentry *binderfs_create_file(struct dentry *parent, const char *name, in binderfs_create_file()
524 struct dentry *dentry; in binderfs_create_file() local
531 dentry = binderfs_create_dentry(parent, name); in binderfs_create_file()
532 if (IS_ERR(dentry)) in binderfs_create_file()
538 dput(dentry); in binderfs_create_file()
539 dentry = ERR_PTR(-ENOMEM); in binderfs_create_file()
545 d_instantiate(dentry, new_inode); in binderfs_create_file()
546 fsnotify_create(parent_inode, dentry); in binderfs_create_file()
550 return dentry; in binderfs_create_file()
553 static struct dentry *binderfs_create_dir(struct dentry *parent, in binderfs_create_dir()
556 struct dentry *dentry; in binderfs_create_dir() local
563 dentry = binderfs_create_dentry(parent, name); in binderfs_create_dir()
564 if (IS_ERR(dentry)) in binderfs_create_dir()
570 dput(dentry); in binderfs_create_dir()
571 dentry = ERR_PTR(-ENOMEM); in binderfs_create_dir()
579 d_instantiate(dentry, new_inode); in binderfs_create_dir()
581 fsnotify_mkdir(parent_inode, dentry); in binderfs_create_dir()
585 return dentry; in binderfs_create_dir()
590 struct dentry *binder_logs_root_dir, *dentry, *proc_log_dir; in init_binder_logs() local
601 dentry = binderfs_create_file(binder_logs_root_dir, "stats", in init_binder_logs()
603 if (IS_ERR(dentry)) { in init_binder_logs()
604 ret = PTR_ERR(dentry); in init_binder_logs()
608 dentry = binderfs_create_file(binder_logs_root_dir, "state", in init_binder_logs()
610 if (IS_ERR(dentry)) { in init_binder_logs()
611 ret = PTR_ERR(dentry); in init_binder_logs()
615 dentry = binderfs_create_file(binder_logs_root_dir, "transactions", in init_binder_logs()
617 if (IS_ERR(dentry)) { in init_binder_logs()
618 ret = PTR_ERR(dentry); in init_binder_logs()
622 dentry = binderfs_create_file(binder_logs_root_dir, in init_binder_logs()
626 if (IS_ERR(dentry)) { in init_binder_logs()
627 ret = PTR_ERR(dentry); in init_binder_logs()
631 dentry = binderfs_create_file(binder_logs_root_dir, in init_binder_logs()
635 if (IS_ERR(dentry)) { in init_binder_logs()
636 ret = PTR_ERR(dentry); in init_binder_logs()
735 static struct dentry *binderfs_mount(struct file_system_type *fs_type, in binderfs_mount()