Lines Matching refs:tree

865  * Cancel requests.  If a non-null tree is specified, only requests specific
866 * to that tree will be cancelled. If a non-null sr is specified, that sr
872 smb_tree_t *tree,
883 (tree == NULL || sr->tid_tree == tree))
943 * Find a tree by tree-id.
951 smb_tree_t *tree;
956 tree = smb_llist_head(&session->s_tree_list);
958 while (tree) {
959 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
960 ASSERT(tree->t_session == session);
962 if (tree->t_tid == tid) {
963 if (smb_tree_hold(tree)) {
965 return (tree);
972 tree = smb_llist_next(&session->s_tree_list, tree);
980 * Find the first connected tree that matches the specified sharename.
981 * If the specified tree is NULL the search starts from the beginning of
982 * the user's tree list. If a tree is provided the search starts just
983 * after that tree.
989 smb_tree_t *tree)
996 if (tree) {
997 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
998 ASSERT(tree->t_session == session);
999 tree = smb_llist_next(&session->s_tree_list, tree);
1001 tree = smb_llist_head(&session->s_tree_list);
1004 while (tree) {
1005 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1006 ASSERT(tree->t_session == session);
1007 if (smb_strcasecmp(tree->t_sharename, sharename, 0) == 0) {
1008 if (smb_tree_hold(tree)) {
1010 return (tree);
1013 tree = smb_llist_next(&session->s_tree_list, tree);
1021 * Find the first connected tree that matches the specified volume name.
1022 * If the specified tree is NULL the search starts from the beginning of
1023 * the user's tree list. If a tree is provided the search starts just
1024 * after that tree.
1030 smb_tree_t *tree)
1037 if (tree) {
1038 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1039 ASSERT(tree->t_session == session);
1040 tree = smb_llist_next(&session->s_tree_list, tree);
1042 tree = smb_llist_head(&session->s_tree_list);
1045 while (tree) {
1046 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1047 ASSERT(tree->t_session == session);
1049 if (smb_strcasecmp(tree->t_volume, name, 0) == 0) {
1050 if (smb_tree_hold(tree)) {
1052 return (tree);
1056 tree = smb_llist_next(&session->s_tree_list, tree);
1071 smb_tree_t *tree;
1075 tree = smb_session_get_tree(session, NULL);
1076 while (tree) {
1078 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1079 ASSERT(tree->t_session == session);
1080 smb_tree_close_pid(tree, pid);
1081 next = smb_session_get_tree(session, tree);
1082 smb_tree_release(tree);
1083 tree = next;
1090 smb_tree_t *tree = (smb_tree_t *)t;
1092 smb_tree_disconnect(tree, B_TRUE);
1094 smb_tree_release(tree);
1106 smb_tree_t *tree;
1114 tree = smb_llist_head(tree_list);
1115 while (tree) {
1116 if ((tree->t_owner == owner) &&
1117 smb_tree_hold(tree)) {
1120 * SMB_TREE_STATE_CONNECTED; schedule this tree
1124 smb_llist_post(tree_list, tree, smb_session_tree_dtor);
1126 tree = smb_llist_next(tree_list, tree);
1140 smb_tree_t *tree;
1144 tree = smb_session_get_tree(session, NULL);
1145 while (tree) {
1146 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1147 ASSERT(tree->t_session == session);
1148 smb_tree_disconnect(tree, B_TRUE);
1149 smb_tree_release(tree);
1150 tree = smb_session_get_tree(session, NULL);
1162 smb_tree_t *tree;
1167 tree = smb_session_lookup_share(session, sharename, NULL);
1168 while (tree) {
1169 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1170 ASSERT(tree->t_session == session);
1171 smb_session_cancel_requests(session, tree, NULL);
1172 smb_tree_disconnect(tree, B_TRUE);
1173 next = smb_session_lookup_share(session, sharename, tree);
1174 smb_tree_release(tree);
1175 tree = next;
1180 smb_session_post_tree(smb_session_t *session, smb_tree_t *tree)
1183 SMB_TREE_VALID(tree);
1184 ASSERT0(tree->t_refcnt);
1185 ASSERT(tree->t_state == SMB_TREE_STATE_DISCONNECTED);
1186 ASSERT(tree->t_session == session);
1188 smb_llist_post(&session->s_tree_list, tree, smb_tree_dealloc);
1192 * Get the next connected tree in the list. A reference is taken on
1193 * the tree, which can be released later with smb_tree_release().
1195 * If the specified tree is NULL the search starts from the beginning of
1196 * the tree list. If a tree is provided the search starts just after
1197 * that tree.
1204 smb_tree_t *tree)
1213 if (tree) {
1214 ASSERT3U(tree->t_magic, ==, SMB_TREE_MAGIC);
1215 tree = smb_llist_next(tree_list, tree);
1217 tree = smb_llist_head(tree_list);
1220 while (tree) {
1221 if (smb_tree_hold(tree))
1224 tree = smb_llist_next(tree_list, tree);
1228 return (tree);