Lines Matching refs:rc
24 int rc; in dfs_parse_target_referral() local
45 rc = smb3_parse_devname(path, ctx); in dfs_parse_target_referral()
46 if (rc) in dfs_parse_target_referral()
49 rc = dns_resolve_server_name_to_ip(path, (struct sockaddr *)&ctx->dstaddr, NULL); in dfs_parse_target_referral()
53 return rc; in dfs_parse_target_referral()
59 int rc; in get_session() local
62 rc = cifs_mount_get_session(mnt_ctx); in get_session()
65 return rc; in get_session()
102 int rc; in parse_dfs_target() local
105 rc = ref_walk_get_tgt(rw, tgt); in parse_dfs_target()
106 if (!rc) in parse_dfs_target()
107 rc = dfs_parse_target_referral(fpath, tgt, ctx); in parse_dfs_target()
108 return rc; in parse_dfs_target()
118 int rc; in set_ref_paths() local
130 rc = PTR_ERR(ref_path); in set_ref_paths()
132 return rc; in set_ref_paths()
145 int rc = -ENOENT; in __dfs_referral_walk() local
150 rc = dfs_get_referral(mnt_ctx, ref_walk_path(rw) + 1, in __dfs_referral_walk()
152 if (rc) { in __dfs_referral_walk()
153 rc = cifs_mount_get_tcon(mnt_ctx); in __dfs_referral_walk()
154 if (!rc) in __dfs_referral_walk()
155 rc = cifs_is_path_remote(mnt_ctx); in __dfs_referral_walk()
159 rc = -ENOENT; in __dfs_referral_walk()
165 rc = parse_dfs_target(ctx, rw, &tgt); in __dfs_referral_walk()
166 if (rc) in __dfs_referral_walk()
170 rc = get_session(mnt_ctx, ref_walk_path(rw)); in __dfs_referral_walk()
171 if (rc) in __dfs_referral_walk()
179 rc = cifs_mount_get_tcon(mnt_ctx); in __dfs_referral_walk()
180 if (!rc) in __dfs_referral_walk()
181 rc = cifs_is_path_remote(mnt_ctx); in __dfs_referral_walk()
182 if (!rc) in __dfs_referral_walk()
184 if (rc != -EREMOTE) in __dfs_referral_walk()
189 rc = add_root_smb_session(mnt_ctx); in __dfs_referral_walk()
190 if (rc) in __dfs_referral_walk()
194 rc = ref_walk_advance(rw); in __dfs_referral_walk()
195 if (!rc) { in __dfs_referral_walk()
196 rc = set_ref_paths(mnt_ctx, &tgt, rw); in __dfs_referral_walk()
197 if (!rc) { in __dfs_referral_walk()
198 rc = -EREMOTE; in __dfs_referral_walk()
202 if (rc != -ELOOP) in __dfs_referral_walk()
205 } while (rc && ref_walk_descend(rw)); in __dfs_referral_walk()
209 return rc; in __dfs_referral_walk()
215 int rc; in dfs_referral_walk() local
222 rc = set_ref_paths(mnt_ctx, NULL, rw); in dfs_referral_walk()
223 if (!rc) in dfs_referral_walk()
224 rc = __dfs_referral_walk(mnt_ctx, rw); in dfs_referral_walk()
226 return rc; in dfs_referral_walk()
235 int rc; in __dfs_mount_share() local
241 rc = dfs_referral_walk(mnt_ctx); in __dfs_mount_share()
242 if (rc) in __dfs_mount_share()
263 return rc; in __dfs_mount_share()
275 int rc = 0; in update_fs_context_dstaddr() local
278 rc = dns_resolve_server_name_to_ip(ctx->source, addr, NULL); in update_fs_context_dstaddr()
279 if (!rc) in update_fs_context_dstaddr()
283 return rc; in update_fs_context_dstaddr()
290 int rc; in dfs_mount_share() local
292 rc = update_fs_context_dstaddr(ctx); in dfs_mount_share()
293 if (rc) in dfs_mount_share()
294 return rc; in dfs_mount_share()
297 rc = get_session(mnt_ctx, NULL); in dfs_mount_share()
298 if (rc) in dfs_mount_share()
299 return rc; in dfs_mount_share()
310 rc = dfs_get_referral(mnt_ctx, ctx->UNC + 1, NULL, NULL); in dfs_mount_share()
311 if (rc) { in dfs_mount_share()
313 __func__, ctx->UNC + 1, rc); in dfs_mount_share()
319 rc = cifs_mount_get_tcon(mnt_ctx); in dfs_mount_share()
320 if (!rc) in dfs_mount_share()
321 rc = cifs_is_path_remote(mnt_ctx); in dfs_mount_share()
322 return rc; in dfs_mount_share()
334 int rc = 0; in update_server_fullpath() local
361 rc = PTR_ERR(npath); in update_server_fullpath()
370 return rc; in update_server_fullpath()
376 int rc = 0; in target_share_matches_server() local
389 rc = match_target_ip(server, dfs_host, dfs_host_len, target_match); in target_share_matches_server()
390 if (rc) in target_share_matches_server()
391 cifs_dbg(VFS, "%s: failed to match target ip: %d\n", __func__, rc); in target_share_matches_server()
394 return rc; in target_share_matches_server()
403 int rc; in __tree_connect_ipc() local
422 rc = server->ops->tree_connect(xid, ses, tree, tcon, in __tree_connect_ipc()
424 cifs_server_dbg(FYI, "%s: tree_reconnect %s: %d\n", __func__, tree, rc); in __tree_connect_ipc()
426 if (rc) { in __tree_connect_ipc()
449 int rc; in __tree_connect_dfs_target() local
459 rc = -ENOENT; in __tree_connect_dfs_target()
473 rc = dfs_cache_get_tgt_share(server->leaf_fullpath + 1, tit, &share, &prefix); in __tree_connect_dfs_target()
474 if (rc) { in __tree_connect_dfs_target()
475 cifs_dbg(VFS, "%s: failed to parse target share: %d\n", __func__, rc); in __tree_connect_dfs_target()
479 rc = target_share_matches_server(server, share, &target_match); in __tree_connect_dfs_target()
480 if (rc) in __tree_connect_dfs_target()
483 rc = -EHOSTUNREACH; in __tree_connect_dfs_target()
492 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
504 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
505 if (rc) in __tree_connect_dfs_target()
508 rc = cifs_update_super_prepath(cifs_sb, prefix); in __tree_connect_dfs_target()
511 rc = update_server_fullpath(server, cifs_sb, target); in __tree_connect_dfs_target()
514 if (!rc) { in __tree_connect_dfs_target()
515 rc = -EREMOTE; in __tree_connect_dfs_target()
527 return rc; in __tree_connect_dfs_target()
534 int rc; in tree_connect_dfs_target() local
540 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, islink, tl); in tree_connect_dfs_target()
541 if (!rc || rc != -EREMOTE) in tree_connect_dfs_target()
543 } while (rc = -ELOOP, ++num_links < MAX_NESTED_LINKS); in tree_connect_dfs_target()
548 if (rc && server->leaf_fullpath != old_fullpath) in tree_connect_dfs_target()
552 return rc; in tree_connect_dfs_target()
557 int rc; in cifs_tree_connect() local
589 rc = -ENOMEM; in cifs_tree_connect()
597 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
611 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, tcon, in cifs_tree_connect()
616 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
624 if (rc) { in cifs_tree_connect()
637 return rc; in cifs_tree_connect()