Lines Matching full: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()
89 int rc; in parse_dfs_target() local
92 rc = ref_walk_get_tgt(rw, tgt); in parse_dfs_target()
93 if (!rc) in parse_dfs_target()
94 rc = dfs_parse_target_referral(fpath, tgt, ctx); in parse_dfs_target()
95 return rc; in parse_dfs_target()
105 int rc; in setup_dfs_ref() local
117 rc = PTR_ERR(ref_path); in setup_dfs_ref()
119 return rc; in setup_dfs_ref()
132 int rc = -ENOENT; in __dfs_referral_walk() local
138 rc = dfs_get_referral(mnt_ctx, ref_walk_path(rw) + 1, in __dfs_referral_walk()
140 if (rc) { in __dfs_referral_walk()
141 rc = cifs_mount_get_tcon(mnt_ctx); in __dfs_referral_walk()
142 if (!rc) in __dfs_referral_walk()
143 rc = cifs_is_path_remote(mnt_ctx); in __dfs_referral_walk()
147 rc = -ENOENT; in __dfs_referral_walk()
153 rc = parse_dfs_target(ctx, rw, &tgt); in __dfs_referral_walk()
154 if (rc) in __dfs_referral_walk()
158 rc = get_session(mnt_ctx, ref_walk_path(rw)); in __dfs_referral_walk()
159 if (rc) in __dfs_referral_walk()
164 rc = cifs_mount_get_tcon(mnt_ctx); in __dfs_referral_walk()
165 if (!rc) in __dfs_referral_walk()
166 rc = cifs_is_path_remote(mnt_ctx); in __dfs_referral_walk()
167 if (!rc) in __dfs_referral_walk()
169 if (rc != -EREMOTE) in __dfs_referral_walk()
174 rc = ref_walk_advance(rw); in __dfs_referral_walk()
175 if (!rc) { in __dfs_referral_walk()
176 rc = setup_dfs_ref(mnt_ctx, &tgt, rw); in __dfs_referral_walk()
177 if (!rc) { in __dfs_referral_walk()
178 rc = -EREMOTE; in __dfs_referral_walk()
182 if (rc != -ELOOP) in __dfs_referral_walk()
185 } while (rc && ref_walk_descend(rw)); in __dfs_referral_walk()
189 return rc; in __dfs_referral_walk()
195 int rc; in dfs_referral_walk() local
199 rc = PTR_ERR(*rw); in dfs_referral_walk()
201 return rc; in dfs_referral_walk()
205 rc = setup_dfs_ref(mnt_ctx, NULL, *rw); in dfs_referral_walk()
206 if (!rc) in dfs_referral_walk()
207 rc = __dfs_referral_walk(mnt_ctx, *rw); in dfs_referral_walk()
208 return rc; in dfs_referral_walk()
218 int rc; in __dfs_mount_share() local
224 rc = dfs_referral_walk(mnt_ctx, &rw); in __dfs_mount_share()
225 if (!rc) { in __dfs_mount_share()
231 rc = -EHOSTDOWN; in __dfs_mount_share()
233 rc = -EACCES; in __dfs_mount_share()
235 rc = -ENOENT; in __dfs_mount_share()
237 if (rc) in __dfs_mount_share()
252 return rc; in __dfs_mount_share()
264 int rc = 0; in update_fs_context_dstaddr() local
267 rc = dns_resolve_server_name_to_ip(ctx->source, addr, NULL); in update_fs_context_dstaddr()
268 if (!rc) in update_fs_context_dstaddr()
272 return rc; in update_fs_context_dstaddr()
279 int rc; in dfs_mount_share() local
281 rc = update_fs_context_dstaddr(ctx); in dfs_mount_share()
282 if (rc) in dfs_mount_share()
283 return rc; in dfs_mount_share()
285 rc = get_session(mnt_ctx, NULL); in dfs_mount_share()
286 if (rc) in dfs_mount_share()
287 return rc; in dfs_mount_share()
297 rc = dfs_get_referral(mnt_ctx, ctx->UNC + 1, NULL, NULL); in dfs_mount_share()
298 if (rc) { in dfs_mount_share()
300 __func__, ctx->UNC + 1, rc); in dfs_mount_share()
306 rc = cifs_mount_get_tcon(mnt_ctx); in dfs_mount_share()
307 if (!rc) in dfs_mount_share()
308 rc = cifs_is_path_remote(mnt_ctx); in dfs_mount_share()
309 return rc; in dfs_mount_share()
315 rc = get_session(mnt_ctx, NULL); in dfs_mount_share()
317 if (!rc) { in dfs_mount_share()
319 rc = __dfs_mount_share(mnt_ctx); in dfs_mount_share()
321 return rc; in dfs_mount_share()
328 int rc = 0; in update_server_fullpath() local
355 rc = PTR_ERR(npath); in update_server_fullpath()
364 return rc; in update_server_fullpath()
370 int rc = 0; in target_share_matches_server() local
383 rc = match_target_ip(server, dfs_host, dfs_host_len, target_match); in target_share_matches_server()
384 if (rc) in target_share_matches_server()
385 cifs_dbg(VFS, "%s: failed to match target ip: %d\n", __func__, rc); in target_share_matches_server()
388 return rc; in target_share_matches_server()
397 int rc; in __tree_connect_ipc() local
416 rc = server->ops->tree_connect(xid, ses, tree, tcon, in __tree_connect_ipc()
418 cifs_server_dbg(FYI, "%s: tree_reconnect %s: %d\n", __func__, tree, rc); in __tree_connect_ipc()
420 if (rc) { in __tree_connect_ipc()
443 int rc; in __tree_connect_dfs_target() local
453 rc = -ENOENT; in __tree_connect_dfs_target()
467 rc = dfs_cache_get_tgt_share(server->leaf_fullpath + 1, tit, &share, &prefix); in __tree_connect_dfs_target()
468 if (rc) { in __tree_connect_dfs_target()
469 cifs_dbg(VFS, "%s: failed to parse target share: %d\n", __func__, rc); in __tree_connect_dfs_target()
473 rc = target_share_matches_server(server, share, &target_match); in __tree_connect_dfs_target()
474 if (rc) in __tree_connect_dfs_target()
477 rc = -EHOSTUNREACH; in __tree_connect_dfs_target()
486 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
498 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
499 if (rc) in __tree_connect_dfs_target()
502 rc = cifs_update_super_prepath(cifs_sb, prefix); in __tree_connect_dfs_target()
505 rc = update_server_fullpath(server, cifs_sb, target); in __tree_connect_dfs_target()
508 if (!rc) { in __tree_connect_dfs_target()
509 rc = -EREMOTE; in __tree_connect_dfs_target()
521 return rc; in __tree_connect_dfs_target()
528 int rc; in tree_connect_dfs_target() local
534 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, islink, tl); in tree_connect_dfs_target()
535 if (!rc || rc != -EREMOTE) in tree_connect_dfs_target()
537 } while (rc = -ELOOP, ++num_links < MAX_NESTED_LINKS); in tree_connect_dfs_target()
542 if (rc && server->leaf_fullpath != old_fullpath) in tree_connect_dfs_target()
546 return rc; in tree_connect_dfs_target()
551 int rc; in cifs_tree_connect() local
583 rc = -ENOMEM; in cifs_tree_connect()
591 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
605 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, tcon, in cifs_tree_connect()
610 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
618 if (rc) { in cifs_tree_connect()
631 return rc; in cifs_tree_connect()