Lines Matching refs:dentry

73 static char *get_dname(struct dentry *dentry)  in get_dname()  argument
77 int len = dentry->d_name.len; in get_dname()
79 dname = dentry->d_name.name; in get_dname()
89 struct inode *inode, struct dentry *dentry, in tracefs_syscall_mkdir() argument
96 name = get_dname(dentry); in tracefs_syscall_mkdir()
123 static int tracefs_syscall_rmdir(struct inode *inode, struct dentry *dentry) in tracefs_syscall_rmdir() argument
128 name = get_dname(dentry); in tracefs_syscall_rmdir()
140 inode_unlock(d_inode(dentry)); in tracefs_syscall_rmdir()
145 inode_lock(d_inode(dentry)); in tracefs_syscall_rmdir()
179 struct inode *inode = d_backing_inode(path->dentry); in tracefs_getattr()
186 static int tracefs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in tracefs_setattr() argument
190 struct inode *inode = d_inode(dentry); in tracefs_setattr()
199 return simple_setattr(idmap, dentry, attr); in tracefs_setattr()
354 static int tracefs_show_options(struct seq_file *m, struct dentry *root) in tracefs_show_options()
388 static void tracefs_d_release(struct dentry *dentry) in tracefs_d_release() argument
390 if (dentry->d_fsdata) in tracefs_d_release()
391 eventfs_d_release(dentry); in tracefs_d_release()
394 static int tracefs_d_revalidate(struct dentry *dentry, unsigned int flags) in tracefs_d_revalidate() argument
396 struct eventfs_inode *ei = dentry->d_fsdata; in tracefs_d_revalidate()
440 static struct dentry *trace_mount(struct file_system_type *fs_type, in trace_mount()
455 struct dentry *tracefs_start_creating(const char *name, struct dentry *parent) in tracefs_start_creating()
457 struct dentry *dentry; in tracefs_start_creating() local
477 dentry = ERR_PTR(-ENOENT); in tracefs_start_creating()
479 dentry = lookup_one_len(name, parent, strlen(name)); in tracefs_start_creating()
480 if (!IS_ERR(dentry) && d_inode(dentry)) { in tracefs_start_creating()
481 dput(dentry); in tracefs_start_creating()
482 dentry = ERR_PTR(-EEXIST); in tracefs_start_creating()
485 if (IS_ERR(dentry)) { in tracefs_start_creating()
490 return dentry; in tracefs_start_creating()
493 struct dentry *tracefs_failed_creating(struct dentry *dentry) in tracefs_failed_creating() argument
495 inode_unlock(d_inode(dentry->d_parent)); in tracefs_failed_creating()
496 dput(dentry); in tracefs_failed_creating()
501 struct dentry *tracefs_end_creating(struct dentry *dentry) in tracefs_end_creating() argument
503 inode_unlock(d_inode(dentry->d_parent)); in tracefs_end_creating()
504 return dentry; in tracefs_end_creating()
508 static struct inode *instance_inode(struct dentry *parent, struct inode *inode) in instance_inode()
553 struct dentry *tracefs_create_file(const char *name, umode_t mode, in tracefs_create_file()
554 struct dentry *parent, void *data, in tracefs_create_file()
558 struct dentry *dentry; in tracefs_create_file() local
567 dentry = tracefs_start_creating(name, parent); in tracefs_create_file()
569 if (IS_ERR(dentry)) in tracefs_create_file()
572 inode = tracefs_get_inode(dentry->d_sb); in tracefs_create_file()
574 return tracefs_failed_creating(dentry); in tracefs_create_file()
583 inode->i_uid = d_inode(dentry->d_parent)->i_uid; in tracefs_create_file()
584 inode->i_gid = d_inode(dentry->d_parent)->i_gid; in tracefs_create_file()
585 d_instantiate(dentry, inode); in tracefs_create_file()
586 fsnotify_create(d_inode(dentry->d_parent), dentry); in tracefs_create_file()
587 return tracefs_end_creating(dentry); in tracefs_create_file()
590 static struct dentry *__create_dir(const char *name, struct dentry *parent, in __create_dir()
594 struct dentry *dentry = tracefs_start_creating(name, parent); in __create_dir() local
597 if (IS_ERR(dentry)) in __create_dir()
600 inode = tracefs_get_inode(dentry->d_sb); in __create_dir()
602 return tracefs_failed_creating(dentry); in __create_dir()
608 inode->i_uid = d_inode(dentry->d_parent)->i_uid; in __create_dir()
609 inode->i_gid = d_inode(dentry->d_parent)->i_gid; in __create_dir()
616 d_instantiate(dentry, inode); in __create_dir()
617 inc_nlink(d_inode(dentry->d_parent)); in __create_dir()
618 fsnotify_mkdir(d_inode(dentry->d_parent), dentry); in __create_dir()
619 return tracefs_end_creating(dentry); in __create_dir()
639 struct dentry *tracefs_create_dir(const char *name, struct dentry *parent) in tracefs_create_dir()
664 __init struct dentry *tracefs_create_instance_dir(const char *name, in tracefs_create_instance_dir()
665 struct dentry *parent, in tracefs_create_instance_dir()
669 struct dentry *dentry; in tracefs_create_instance_dir() local
675 dentry = __create_dir(name, parent, &tracefs_instance_dir_inode_operations); in tracefs_create_instance_dir()
676 if (!dentry) in tracefs_create_instance_dir()
682 return dentry; in tracefs_create_instance_dir()
685 static void remove_one(struct dentry *victim) in remove_one()
698 void tracefs_remove(struct dentry *dentry) in tracefs_remove() argument
700 if (IS_ERR_OR_NULL(dentry)) in tracefs_remove()
704 simple_recursive_removal(dentry, remove_one); in tracefs_remove()