• Home
  • Raw
  • Download

Lines Matching refs:dentry

86 	struct dentry *dentry;  in rpc_timeout_upcall_queue()  local
94 dentry = dget(pipe->dentry); in rpc_timeout_upcall_queue()
96 rpc_purge_list(dentry ? &RPC_I(dentry->d_inode)->waitq : NULL, in rpc_timeout_upcall_queue()
98 dput(dentry); in rpc_timeout_upcall_queue()
135 struct dentry *dentry; in rpc_queue_upcall() local
151 dentry = dget(pipe->dentry); in rpc_queue_upcall()
153 if (dentry) { in rpc_queue_upcall()
154 wake_up(&RPC_I(dentry->d_inode)->waitq); in rpc_queue_upcall()
155 dput(dentry); in rpc_queue_upcall()
181 pipe->dentry = NULL; in rpc_close_pipes()
430 spin_lock(&file->f_path.dentry->d_lock); in rpc_info_open()
431 if (!d_unhashed(file->f_path.dentry)) in rpc_info_open()
434 spin_unlock(&file->f_path.dentry->d_lock); in rpc_info_open()
437 spin_unlock(&file->f_path.dentry->d_lock); in rpc_info_open()
474 static int rpc_delete_dentry(const struct dentry *dentry) in rpc_delete_dentry() argument
503 static int __rpc_create_common(struct inode *dir, struct dentry *dentry, in __rpc_create_common() argument
510 d_drop(dentry); in __rpc_create_common()
519 d_add(dentry, inode); in __rpc_create_common()
523 __FILE__, __func__, dentry->d_name.name); in __rpc_create_common()
524 dput(dentry); in __rpc_create_common()
528 static int __rpc_create(struct inode *dir, struct dentry *dentry, in __rpc_create() argument
535 err = __rpc_create_common(dir, dentry, S_IFREG | mode, i_fop, private); in __rpc_create()
538 fsnotify_create(dir, dentry); in __rpc_create()
542 static int __rpc_mkdir(struct inode *dir, struct dentry *dentry, in __rpc_mkdir() argument
549 err = __rpc_create_common(dir, dentry, S_IFDIR | mode, i_fop, private); in __rpc_mkdir()
553 fsnotify_mkdir(dir, dentry); in __rpc_mkdir()
570 pipe->dentry = NULL; in init_pipe()
593 static int __rpc_mkpipe_dentry(struct inode *dir, struct dentry *dentry, in __rpc_mkpipe_dentry() argument
602 err = __rpc_create_common(dir, dentry, S_IFIFO | mode, i_fop, private); in __rpc_mkpipe_dentry()
605 rpci = RPC_I(dentry->d_inode); in __rpc_mkpipe_dentry()
608 fsnotify_create(dir, dentry); in __rpc_mkpipe_dentry()
612 static int __rpc_rmdir(struct inode *dir, struct dentry *dentry) in __rpc_rmdir() argument
616 dget(dentry); in __rpc_rmdir()
617 ret = simple_rmdir(dir, dentry); in __rpc_rmdir()
618 d_delete(dentry); in __rpc_rmdir()
619 dput(dentry); in __rpc_rmdir()
623 int rpc_rmdir(struct dentry *dentry) in rpc_rmdir() argument
625 struct dentry *parent; in rpc_rmdir()
629 parent = dget_parent(dentry); in rpc_rmdir()
632 error = __rpc_rmdir(dir, dentry); in rpc_rmdir()
639 static int __rpc_unlink(struct inode *dir, struct dentry *dentry) in __rpc_unlink() argument
643 dget(dentry); in __rpc_unlink()
644 ret = simple_unlink(dir, dentry); in __rpc_unlink()
645 d_delete(dentry); in __rpc_unlink()
646 dput(dentry); in __rpc_unlink()
650 static int __rpc_rmpipe(struct inode *dir, struct dentry *dentry) in __rpc_rmpipe() argument
652 struct inode *inode = dentry->d_inode; in __rpc_rmpipe()
655 return __rpc_unlink(dir, dentry); in __rpc_rmpipe()
658 static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent, in __rpc_lookup_create_exclusive()
661 struct dentry *dentry; in __rpc_lookup_create_exclusive() local
663 dentry = d_lookup(parent, name); in __rpc_lookup_create_exclusive()
664 if (!dentry) { in __rpc_lookup_create_exclusive()
665 dentry = d_alloc(parent, name); in __rpc_lookup_create_exclusive()
666 if (!dentry) in __rpc_lookup_create_exclusive()
669 if (dentry->d_inode == NULL) { in __rpc_lookup_create_exclusive()
670 d_set_d_op(dentry, &rpc_dentry_operations); in __rpc_lookup_create_exclusive()
671 return dentry; in __rpc_lookup_create_exclusive()
673 dput(dentry); in __rpc_lookup_create_exclusive()
680 static void __rpc_depopulate(struct dentry *parent, in __rpc_depopulate()
685 struct dentry *dentry; in __rpc_depopulate() local
693 dentry = d_lookup(parent, &name); in __rpc_depopulate()
695 if (dentry == NULL) in __rpc_depopulate()
697 if (dentry->d_inode == NULL) in __rpc_depopulate()
699 switch (dentry->d_inode->i_mode & S_IFMT) { in __rpc_depopulate()
703 __rpc_unlink(dir, dentry); in __rpc_depopulate()
706 __rpc_rmdir(dir, dentry); in __rpc_depopulate()
709 dput(dentry); in __rpc_depopulate()
713 static void rpc_depopulate(struct dentry *parent, in rpc_depopulate()
724 static int rpc_populate(struct dentry *parent, in rpc_populate()
730 struct dentry *dentry; in rpc_populate() local
740 dentry = __rpc_lookup_create_exclusive(parent, &q); in rpc_populate()
741 err = PTR_ERR(dentry); in rpc_populate()
742 if (IS_ERR(dentry)) in rpc_populate()
748 err = __rpc_create(dir, dentry, in rpc_populate()
754 err = __rpc_mkdir(dir, dentry, in rpc_populate()
772 static struct dentry *rpc_mkdir_populate(struct dentry *parent, in rpc_mkdir_populate()
774 int (*populate)(struct dentry *, void *), void *args_populate) in rpc_mkdir_populate() argument
776 struct dentry *dentry; in rpc_mkdir_populate() local
781 dentry = __rpc_lookup_create_exclusive(parent, name); in rpc_mkdir_populate()
782 if (IS_ERR(dentry)) in rpc_mkdir_populate()
784 error = __rpc_mkdir(dir, dentry, mode, NULL, private); in rpc_mkdir_populate()
788 error = populate(dentry, args_populate); in rpc_mkdir_populate()
794 return dentry; in rpc_mkdir_populate()
796 __rpc_rmdir(dir, dentry); in rpc_mkdir_populate()
798 dentry = ERR_PTR(error); in rpc_mkdir_populate()
802 static int rpc_rmdir_depopulate(struct dentry *dentry, in rpc_rmdir_depopulate() argument
803 void (*depopulate)(struct dentry *)) in rpc_rmdir_depopulate() argument
805 struct dentry *parent; in rpc_rmdir_depopulate()
809 parent = dget_parent(dentry); in rpc_rmdir_depopulate()
813 depopulate(dentry); in rpc_rmdir_depopulate()
814 error = __rpc_rmdir(dir, dentry); in rpc_rmdir_depopulate()
838 struct dentry *rpc_mkpipe_dentry(struct dentry *parent, const char *name, in rpc_mkpipe_dentry()
841 struct dentry *dentry; in rpc_mkpipe_dentry() local
857 dentry = __rpc_lookup_create_exclusive(parent, &q); in rpc_mkpipe_dentry()
858 if (IS_ERR(dentry)) in rpc_mkpipe_dentry()
860 err = __rpc_mkpipe_dentry(dir, dentry, umode, &rpc_pipe_fops, in rpc_mkpipe_dentry()
866 return dentry; in rpc_mkpipe_dentry()
868 dentry = ERR_PTR(err); in rpc_mkpipe_dentry()
885 rpc_unlink(struct dentry *dentry) in rpc_unlink() argument
887 struct dentry *parent; in rpc_unlink()
891 parent = dget_parent(dentry); in rpc_unlink()
894 error = __rpc_rmpipe(dir, dentry); in rpc_unlink()
914 static int rpc_clntdir_populate(struct dentry *dentry, void *private) in rpc_clntdir_populate() argument
916 return rpc_populate(dentry, in rpc_clntdir_populate()
921 static void rpc_clntdir_depopulate(struct dentry *dentry) in rpc_clntdir_depopulate() argument
923 rpc_depopulate(dentry, authfiles, RPCAUTH_info, RPCAUTH_EOF); in rpc_clntdir_depopulate()
937 struct dentry *rpc_create_client_dir(struct dentry *dentry, in rpc_create_client_dir() argument
941 return rpc_mkdir_populate(dentry, name, S_IRUGO | S_IXUGO, NULL, in rpc_create_client_dir()
949 int rpc_remove_client_dir(struct dentry *dentry) in rpc_remove_client_dir() argument
951 return rpc_rmdir_depopulate(dentry, rpc_clntdir_depopulate); in rpc_remove_client_dir()
972 static int rpc_cachedir_populate(struct dentry *dentry, void *private) in rpc_cachedir_populate() argument
974 return rpc_populate(dentry, in rpc_cachedir_populate()
979 static void rpc_cachedir_depopulate(struct dentry *dentry) in rpc_cachedir_depopulate() argument
981 rpc_depopulate(dentry, cache_pipefs_files, 0, 3); in rpc_cachedir_depopulate()
984 struct dentry *rpc_create_cache_dir(struct dentry *parent, struct qstr *name, in rpc_create_cache_dir()
991 void rpc_remove_cache_dir(struct dentry *dentry) in rpc_remove_cache_dir() argument
993 rpc_rmdir_depopulate(dentry, rpc_cachedir_depopulate); in rpc_remove_cache_dir()
1060 struct dentry *rpc_d_lookup_sb(const struct super_block *sb, in rpc_d_lookup_sb()
1110 struct dentry *root; in rpc_fill_super()
1147 static struct dentry *