Lines Matching refs:dirh

41 	struct tee_fs_dirfile_dirh *dirh;  member
527 static TEE_Result open_dirh(struct tee_fs_dirfile_dirh **dirh) in open_dirh() argument
549 res = tee_fs_dirfile_open(false, hashp, 0, &ree_dirf_ops, dirh); in open_dirh()
568 res = tee_fs_dirfile_open(true, NULL, 0, &ree_dirf_ops, dirh); in open_dirh()
578 static TEE_Result commit_dirh_writes(struct tee_fs_dirfile_dirh *dirh) in commit_dirh_writes() argument
583 res = tee_fs_dirfile_commit_writes(dirh, hash, NULL); in commit_dirh_writes()
589 static void close_dirh(struct tee_fs_dirfile_dirh **dirh) in close_dirh() argument
591 tee_fs_dirfile_close(*dirh); in close_dirh()
592 *dirh = NULL; in close_dirh()
597 static TEE_Result open_dirh(struct tee_fs_dirfile_dirh **dirh) in open_dirh() argument
617 dirh); in open_dirh()
627 &ree_dirf_ops, dirh); in open_dirh()
633 static TEE_Result commit_dirh_writes(struct tee_fs_dirfile_dirh *dirh) in commit_dirh_writes() argument
638 res = tee_fs_dirfile_commit_writes(dirh, NULL, &counter); in commit_dirh_writes()
654 static void close_dirh(struct tee_fs_dirfile_dirh **dirh) in close_dirh() argument
656 tee_fs_dirfile_close(*dirh); in close_dirh()
657 *dirh = NULL; in close_dirh()
661 static TEE_Result get_dirh(struct tee_fs_dirfile_dirh **dirh) in get_dirh() argument
667 *dirh = NULL; in get_dirh()
674 *dirh = ree_fs_dirh; in get_dirh()
699 static void put_dirh(struct tee_fs_dirfile_dirh *dirh, bool close) in put_dirh() argument
701 if (dirh) { in put_dirh()
702 assert(dirh == ree_fs_dirh); in put_dirh()
711 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_open() local
716 res = get_dirh(&dirh); in ree_fs_open()
720 res = tee_fs_dirfile_find(dirh, &po->uuid, po->obj_id, po->obj_id_len, in ree_fs_open()
740 put_dirh(dirh, true); in ree_fs_open()
746 static TEE_Result set_name(struct tee_fs_dirfile_dirh *dirh, in set_name() argument
754 res = tee_fs_dirfile_find(dirh, &po->uuid, po->obj_id, po->obj_id_len, in set_name()
768 res = tee_fs_dirfile_rename(dirh, &po->uuid, &fdp->dfh, in set_name()
773 res = commit_dirh_writes(dirh); in set_name()
802 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_create() local
813 res = get_dirh(&dirh); in ree_fs_create()
817 res = tee_fs_dirfile_get_tmp(dirh, &dfh); in ree_fs_create()
851 res = set_name(dirh, fdp, po, overwrite); in ree_fs_create()
854 put_dirh(dirh, true); in ree_fs_create()
871 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_write() local
879 res = get_dirh(&dirh); in ree_fs_write()
891 res = tee_fs_dirfile_update_hash(dirh, &fdp->dfh); in ree_fs_write()
894 res = commit_dirh_writes(dirh); in ree_fs_write()
896 put_dirh(dirh, res); in ree_fs_write()
906 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_rename() local
914 res = get_dirh(&dirh); in ree_fs_rename()
918 res = tee_fs_dirfile_find(dirh, &new->uuid, new->obj_id, in ree_fs_rename()
925 res = tee_fs_dirfile_find(dirh, &old->uuid, old->obj_id, in ree_fs_rename()
930 res = tee_fs_dirfile_rename(dirh, &new->uuid, &dfh, new->obj_id, in ree_fs_rename()
936 res = tee_fs_dirfile_remove(dirh, &remove_dfh); in ree_fs_rename()
941 res = commit_dirh_writes(dirh); in ree_fs_rename()
949 put_dirh(dirh, res); in ree_fs_rename()
959 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_remove() local
963 res = get_dirh(&dirh); in ree_fs_remove()
967 res = tee_fs_dirfile_find(dirh, &po->uuid, po->obj_id, po->obj_id_len, in ree_fs_remove()
972 res = tee_fs_dirfile_remove(dirh, &dfh); in ree_fs_remove()
976 res = commit_dirh_writes(dirh); in ree_fs_remove()
982 assert(tee_fs_dirfile_find(dirh, &po->uuid, po->obj_id, po->obj_id_len, in ree_fs_remove()
985 put_dirh(dirh, res); in ree_fs_remove()
994 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_truncate() local
999 res = get_dirh(&dirh); in ree_fs_truncate()
1011 res = tee_fs_dirfile_update_hash(dirh, &fdp->dfh); in ree_fs_truncate()
1014 res = commit_dirh_writes(dirh); in ree_fs_truncate()
1016 put_dirh(dirh, res); in ree_fs_truncate()
1027 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_opendir_rpc() local
1037 res = get_dirh(&dirh); in ree_fs_opendir_rpc()
1044 res = tee_fs_dirfile_get_next(dirh, d->uuid, &d->idx, d->d.oid, in ree_fs_opendir_rpc()
1053 put_dirh(dirh, false); in ree_fs_opendir_rpc()
1076 struct tee_fs_dirfile_dirh *dirh = NULL; in ree_fs_readdir_rpc() local
1081 res = get_dirh(&dirh); in ree_fs_readdir_rpc()
1086 res = tee_fs_dirfile_get_next(dirh, d->uuid, &d->idx, d->d.oid, in ree_fs_readdir_rpc()
1091 put_dirh(dirh, res); in ree_fs_readdir_rpc()