• Home
  • Raw
  • Download

Lines Matching refs:rc

91 	int rc;  in reconn_set_ipaddr_from_hostname()  local
109 rc = dns_resolve_server_name_to_ip(unc, &ipaddr, &expiry); in reconn_set_ipaddr_from_hostname()
112 if (rc < 0) { in reconn_set_ipaddr_from_hostname()
114 __func__, server->hostname, rc); in reconn_set_ipaddr_from_hostname()
119 rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr, in reconn_set_ipaddr_from_hostname()
125 if (rc) { in reconn_set_ipaddr_from_hostname()
134 rc = !rc ? -1 : 0; in reconn_set_ipaddr_from_hostname()
141 return rc; in reconn_set_ipaddr_from_hostname()
147 int rc; in cifs_resolve_server() local
156 rc = reconn_set_ipaddr_from_hostname(server); in cifs_resolve_server()
157 if (rc) { in cifs_resolve_server()
159 __func__, rc); in cifs_resolve_server()
275 int rc = 0; in __cifs_reconnect() local
288 rc = reconn_set_ipaddr_from_hostname(server); in __cifs_reconnect()
289 cifs_dbg(FYI, "%s: reconn_set_ipaddr_from_hostname: rc=%d\n", __func__, rc); in __cifs_reconnect()
293 rc = smbd_reconnect(server); in __cifs_reconnect()
295 rc = generic_ip_connect(server); in __cifs_reconnect()
296 if (rc) { in __cifs_reconnect()
298 cifs_dbg(FYI, "%s: reconnect error %d\n", __func__, rc); in __cifs_reconnect()
316 return rc; in __cifs_reconnect()
322 int rc; in __reconnect_target_unlocked() local
339 rc = reconn_set_ipaddr_from_hostname(server); in __reconnect_target_unlocked()
340 cifs_dbg(FYI, "%s: reconn_set_ipaddr_from_hostname: rc=%d\n", __func__, rc); in __reconnect_target_unlocked()
344 rc = smbd_reconnect(server); in __reconnect_target_unlocked()
346 rc = generic_ip_connect(server); in __reconnect_target_unlocked()
348 return rc; in __reconnect_target_unlocked()
354 int rc; in reconnect_target_unlocked() local
366 rc = __reconnect_target_unlocked(server, dfs_cache_get_tgt_name(tit)); in reconnect_target_unlocked()
367 if (!rc) { in reconnect_target_unlocked()
372 return rc; in reconnect_target_unlocked()
377 int rc = 0; in reconnect_dfs_server() local
405 rc = reconnect_target_unlocked(server, &tl, &target_hint); in reconnect_dfs_server()
406 if (rc) { in reconnect_dfs_server()
409 cifs_dbg(FYI, "%s: reconnect error %d\n", __func__, rc); in reconnect_dfs_server()
438 return rc; in reconnect_dfs_server()
463 int rc; in cifs_echo_request() local
479 rc = server->ops->echo ? server->ops->echo(server) : -ENOSYS; in cifs_echo_request()
480 if (rc) in cifs_echo_request()
1406 int rc; in cifs_get_tcp_session() local
1417 rc = -ENOMEM; in cifs_get_tcp_session()
1423 rc = -ENOMEM; in cifs_get_tcp_session()
1491 rc = -ENOENT; in cifs_get_tcp_session()
1498 rc = 0; in cifs_get_tcp_session()
1501 rc = -ENOENT; in cifs_get_tcp_session()
1505 rc = ip_connect(tcp_ses); in cifs_get_tcp_session()
1506 if (rc < 0) { in cifs_get_tcp_session()
1519 rc = PTR_ERR(tcp_ses->tsk); in cifs_get_tcp_session()
1520 cifs_dbg(VFS, "error %d create cifsd thread\n", rc); in cifs_get_tcp_session()
1569 return ERR_PTR(rc); in cifs_get_tcp_session()
1629 int rc = 0, xid; in cifs_setup_ipc() local
1659 rc = server->ops->tree_connect(xid, ses, unc, tcon, ctx->local_nls); in cifs_setup_ipc()
1662 if (rc) { in cifs_setup_ipc()
1663 cifs_server_dbg(VFS, "failed to connect to IPC (rc=%d)\n", rc); in cifs_setup_ipc()
1668 cifs_dbg(FYI, "IPC tcon rc = %d ipc tid = %d\n", rc, tcon->tid); in cifs_setup_ipc()
1672 return rc; in cifs_setup_ipc()
1721 unsigned int rc, xid; in cifs_put_smb_ses() local
1753 rc = server->ops->logoff(xid, ses); in cifs_put_smb_ses()
1754 if (rc) in cifs_put_smb_ses()
1756 __func__, rc); in cifs_put_smb_ses()
1797 int rc = 0; in cifs_set_cifscreds() local
1825 rc = -EINVAL; in cifs_set_cifscreds()
1834 rc = PTR_ERR(key); in cifs_set_cifscreds()
1843 rc = PTR_ERR(key); in cifs_set_cifscreds()
1852 rc = upayload ? PTR_ERR(upayload) : -EINVAL; in cifs_set_cifscreds()
1863 rc = -EINVAL; in cifs_set_cifscreds()
1871 rc = -EINVAL; in cifs_set_cifscreds()
1879 rc = -ENOMEM; in cifs_set_cifscreds()
1887 rc = -EINVAL; in cifs_set_cifscreds()
1898 rc = -ENOMEM; in cifs_set_cifscreds()
1913 rc = -ENOMEM; in cifs_set_cifscreds()
1927 cifs_dbg(FYI, "%s: returning %d\n", __func__, rc); in cifs_set_cifscreds()
1928 return rc; in cifs_set_cifscreds()
1951 int rc = 0; in cifs_get_smb_ses() local
1965 rc = cifs_negotiate_protocol(xid, ses); in cifs_get_smb_ses()
1966 if (rc) { in cifs_get_smb_ses()
1971 return ERR_PTR(rc); in cifs_get_smb_ses()
1975 rc = cifs_setup_session(xid, ses, in cifs_get_smb_ses()
1977 if (rc) { in cifs_get_smb_ses()
1982 return ERR_PTR(rc); in cifs_get_smb_ses()
1993 rc = -ENOMEM; in cifs_get_smb_ses()
2040 rc = cifs_negotiate_protocol(xid, ses); in cifs_get_smb_ses()
2041 if (!rc) in cifs_get_smb_ses()
2042 rc = cifs_setup_session(xid, ses, ctx->local_nls); in cifs_get_smb_ses()
2049 if (rc) in cifs_get_smb_ses()
2066 return ERR_PTR(rc); in cifs_get_smb_ses()
2133 int rc; in cifs_put_tcon() local
2135 rc = cifs_swn_unregister(tcon); in cifs_put_tcon()
2136 if (rc < 0) { in cifs_put_tcon()
2138 __func__, rc); in cifs_put_tcon()
2180 int rc, xid; in cifs_get_tcon() local
2195 rc = -ENOSYS; in cifs_get_tcon()
2201 rc = -ENOMEM; in cifs_get_tcon()
2209 rc = -EOPNOTSUPP; in cifs_get_tcon()
2219 rc = -EOPNOTSUPP; in cifs_get_tcon()
2229 rc = -ENOMEM; in cifs_get_tcon()
2238 rc = -EOPNOTSUPP; in cifs_get_tcon()
2245 rc = -EOPNOTSUPP; in cifs_get_tcon()
2256 rc = -EOPNOTSUPP; in cifs_get_tcon()
2266 rc = ses->server->ops->tree_connect(xid, ses, ctx->UNC, tcon, in cifs_get_tcon()
2269 cifs_dbg(FYI, "Tcon rc = %d\n", rc); in cifs_get_tcon()
2270 if (rc) in cifs_get_tcon()
2279 rc = -EOPNOTSUPP; in cifs_get_tcon()
2287 rc = -EOPNOTSUPP; in cifs_get_tcon()
2299 rc = -EOPNOTSUPP; in cifs_get_tcon()
2315 rc = cifs_swn_register(tcon); in cifs_get_tcon()
2316 if (rc < 0) { in cifs_get_tcon()
2317 cifs_dbg(VFS, "Failed to register for witness notifications: %d\n", rc); in cifs_get_tcon()
2323 rc = -EOPNOTSUPP; in cifs_get_tcon()
2328 rc = -EOPNOTSUPP; in cifs_get_tcon()
2345 rc = -EOPNOTSUPP; in cifs_get_tcon()
2376 return ERR_PTR(rc); in cifs_get_tcon()
2473 int rc = 0; in cifs_match_super() local
2500 rc = 0; in cifs_match_super()
2504 rc = compare_mount_options(sb, mnt_data); in cifs_match_super()
2508 return rc; in cifs_match_super()
2561 int rc = 0; in bind_socket() local
2565 rc = socket->ops->bind(socket, in bind_socket()
2568 if (rc < 0) { in bind_socket()
2575 &saddr6->sin6_addr, rc); in bind_socket()
2578 &saddr4->sin_addr.s_addr, rc); in bind_socket()
2581 return rc; in bind_socket()
2587 int rc = 0; in ip_rfc1001_connect() local
2634 rc = smb_send(server, smb_buf, 0x44); in ip_rfc1001_connect()
2653 return rc; in ip_rfc1001_connect()
2659 int rc = 0; in generic_ip_connect() local
2686 rc = __sock_create(cifs_net_ns(server), sfamily, SOCK_STREAM, in generic_ip_connect()
2688 if (rc < 0) { in generic_ip_connect()
2689 cifs_server_dbg(VFS, "Error %d creating socket\n", rc); in generic_ip_connect()
2691 return rc; in generic_ip_connect()
2704 rc = bind_socket(server); in generic_ip_connect()
2705 if (rc < 0) in generic_ip_connect()
2706 return rc; in generic_ip_connect()
2731 rc = socket->ops->connect(socket, saddr, slen, in generic_ip_connect()
2738 if (server->noblockcnt && rc == -EINPROGRESS) in generic_ip_connect()
2739 rc = 0; in generic_ip_connect()
2740 if (rc < 0) { in generic_ip_connect()
2741 cifs_dbg(FYI, "Error %d connecting to server\n", rc); in generic_ip_connect()
2744 return rc; in generic_ip_connect()
2748 rc = ip_rfc1001_connect(server); in generic_ip_connect()
2750 return rc; in generic_ip_connect()
2766 int rc; in ip_connect() local
2771 rc = generic_ip_connect(server); in ip_connect()
2772 if (rc >= 0) in ip_connect()
2773 return rc; in ip_connect()
2943 int rc = 0; in mount_put_conns() local
2958 int rc = 0; in mount_get_conns() local
2971 rc = PTR_ERR(server); in mount_get_conns()
2979 rc = PTR_ERR(ses); in mount_get_conns()
2987 rc = -EOPNOTSUPP; in mount_get_conns()
2994 rc = PTR_ERR(tcon); in mount_get_conns()
3013 rc = -EACCES; in mount_get_conns()
3051 return rc; in mount_get_conns()
3084 int rc; in mount_get_dfs_conns() local
3087 rc = mount_get_conns(mnt_ctx); in mount_get_dfs_conns()
3094 return rc; in mount_get_dfs_conns()
3141 int rc; in expand_dfs_referral() local
3149 rc = PTR_ERR(mdata); in expand_dfs_referral()
3159 rc = cifs_setup_volume_info(ctx, mdata, fake_devname); in expand_dfs_referral()
3165 return rc; in expand_dfs_referral()
3175 int rc; in cifs_setup_volume_info() local
3179 rc = smb3_parse_devname(devname, ctx); in cifs_setup_volume_info()
3180 if (rc) { in cifs_setup_volume_info()
3181 cifs_dbg(VFS, "%s: failed to parse %s: %d\n", __func__, devname, rc); in cifs_setup_volume_info()
3182 return rc; in cifs_setup_volume_info()
3189 rc = smb3_parse_opt(mntopts, "ip", &ip); in cifs_setup_volume_info()
3190 if (rc) { in cifs_setup_volume_info()
3191 cifs_dbg(VFS, "%s: failed to parse ip options: %d\n", __func__, rc); in cifs_setup_volume_info()
3192 return rc; in cifs_setup_volume_info()
3195 rc = cifs_convert_address((struct sockaddr *)&ctx->dstaddr, ip, strlen(ip)); in cifs_setup_volume_info()
3197 if (!rc) { in cifs_setup_volume_info()
3228 int rc; in cifs_are_all_path_components_accessible() local
3236 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, ""); in cifs_are_all_path_components_accessible()
3237 while (rc == 0) { in cifs_are_all_path_components_accessible()
3260 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, in cifs_are_all_path_components_accessible()
3264 return rc; in cifs_are_all_path_components_accessible()
3273 int rc; in is_path_remote() local
3294 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, in is_path_remote()
3296 if (rc != 0 && rc != -EREMOTE) { in is_path_remote()
3298 return rc; in is_path_remote()
3301 if (rc != -EREMOTE) { in is_path_remote()
3302 rc = cifs_are_all_path_components_accessible(server, xid, tcon, in is_path_remote()
3304 if (rc != 0) { in is_path_remote()
3307 rc = 0; in is_path_remote()
3312 return rc; in is_path_remote()
3329 int rc; in is_dfs_mount() local
3335 rc = mount_get_conns(mnt_ctx); in is_dfs_mount()
3346 if (rc) in is_dfs_mount()
3347 return rc; in is_dfs_mount()
3349 rc = is_path_remote(mnt_ctx); in is_dfs_mount()
3350 if (!rc) in is_dfs_mount()
3352 else if (rc != -EREMOTE) in is_dfs_mount()
3353 return rc; in is_dfs_mount()
3361 int rc; in connect_dfs_target() local
3366 rc = dfs_cache_get_tgt_referral(ref_path, tit, &ref); in connect_dfs_target()
3367 if (rc) in connect_dfs_target()
3370 rc = expand_dfs_referral(mnt_ctx, full_path, &ref); in connect_dfs_target()
3371 if (rc) in connect_dfs_target()
3377 rc = mount_get_dfs_conns(mnt_ctx); in connect_dfs_target()
3379 if (!rc) { in connect_dfs_target()
3382 rc = dfs_cache_update_tgthint(mnt_ctx->xid, mnt_ctx->root_ses, cifs_sb->local_nls, in connect_dfs_target()
3388 return rc; in connect_dfs_target()
3393 int rc; in connect_dfs_root() local
3414 rc = PTR_ERR(mnt_ctx->origin_fullpath); in connect_dfs_root()
3420 for (rc = -ENOENT, tit = dfs_cache_get_tgt_iterator(root_tl); in connect_dfs_root()
3422 rc = connect_dfs_target(mnt_ctx, full_path, mnt_ctx->origin_fullpath + 1, tit); in connect_dfs_root()
3423 if (!rc) { in connect_dfs_root()
3426 rc = -ENOMEM; in connect_dfs_root()
3433 return rc; in connect_dfs_root()
3438 int rc; in __follow_dfs_link() local
3453 rc = PTR_ERR(mnt_ctx->leaf_fullpath); in __follow_dfs_link()
3459 rc = dfs_cache_find(mnt_ctx->xid, mnt_ctx->root_ses, cifs_sb->local_nls, in __follow_dfs_link()
3461 if (rc) in __follow_dfs_link()
3465 for (rc = -ENOENT, tit = dfs_cache_get_tgt_iterator(&tl); in __follow_dfs_link()
3467 rc = connect_dfs_target(mnt_ctx, full_path, mnt_ctx->leaf_fullpath + 1, tit); in __follow_dfs_link()
3468 if (!rc) { in __follow_dfs_link()
3469 rc = is_path_remote(mnt_ctx); in __follow_dfs_link()
3477 return rc; in __follow_dfs_link()
3482 int rc; in follow_dfs_link() local
3498 rc = PTR_ERR(mnt_ctx->origin_fullpath); in follow_dfs_link()
3500 return rc; in follow_dfs_link()
3504 rc = __follow_dfs_link(mnt_ctx); in follow_dfs_link()
3505 if (!rc || rc != -EREMOTE) in follow_dfs_link()
3507 } while (rc = -ELOOP, ++num_links < MAX_NESTED_LINKS); in follow_dfs_link()
3509 return rc; in follow_dfs_link()
3525 int rc; in cifs_mount() local
3530 rc = is_dfs_mount(&mnt_ctx, &isdfs, &tl); in cifs_mount()
3531 if (rc) in cifs_mount()
3537 rc = connect_dfs_root(&mnt_ctx, &tl); in cifs_mount()
3540 if (rc) in cifs_mount()
3543 rc = is_path_remote(&mnt_ctx); in cifs_mount()
3544 if (rc == -EREMOTE) in cifs_mount()
3545 rc = follow_dfs_link(&mnt_ctx); in cifs_mount()
3546 if (rc) in cifs_mount()
3567 rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); in cifs_mount()
3568 if (rc) in cifs_mount()
3572 return rc; in cifs_mount()
3579 return rc; in cifs_mount()
3584 int rc = 0; in cifs_mount() local
3587 rc = mount_get_conns(&mnt_ctx); in cifs_mount()
3588 if (rc) in cifs_mount()
3592 rc = is_path_remote(&mnt_ctx); in cifs_mount()
3593 if (rc == -EREMOTE) in cifs_mount()
3594 rc = -EOPNOTSUPP; in cifs_mount()
3595 if (rc) in cifs_mount()
3599 rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); in cifs_mount()
3600 if (rc) in cifs_mount()
3604 return rc; in cifs_mount()
3608 return rc; in cifs_mount()
3625 int rc = 0; in CIFSTCon() local
3683 rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, &length, in CIFSTCon()
3687 if (rc == 0) { in CIFSTCon()
3738 return rc; in CIFSTCon()
3782 int rc = 0; in cifs_negotiate_protocol() local
3792 rc = server->ops->negotiate(xid, ses); in cifs_negotiate_protocol()
3793 if (rc == 0) { in cifs_negotiate_protocol()
3798 rc = -EHOSTDOWN; in cifs_negotiate_protocol()
3802 return rc; in cifs_negotiate_protocol()
3809 int rc = -ENOSYS; in cifs_setup_session() local
3830 rc = server->ops->sess_setup(xid, ses, nls_info); in cifs_setup_session()
3832 if (rc) in cifs_setup_session()
3833 cifs_server_dbg(VFS, "Send error in SessSetup = %d\n", rc); in cifs_setup_session()
3835 return rc; in cifs_setup_session()
3853 int rc; in cifs_construct_tcon() local
3882 rc = cifs_set_vol_auth(ctx, master_tcon->ses); in cifs_construct_tcon()
3883 if (rc) { in cifs_construct_tcon()
3884 tcon = ERR_PTR(rc); in cifs_construct_tcon()
4117 int rc = 0; in update_server_fullpath() local
4144 rc = PTR_ERR(npath); in update_server_fullpath()
4152 return rc; in update_server_fullpath()
4158 int rc = 0; in target_share_matches_server() local
4169 rc = match_target_ip(server, dfs_host, dfs_host_len, target_match); in target_share_matches_server()
4170 if (rc) in target_share_matches_server()
4171 cifs_dbg(VFS, "%s: failed to match target ip: %d\n", __func__, rc); in target_share_matches_server()
4173 return rc; in target_share_matches_server()
4180 int rc; in __tree_connect_dfs_target() local
4198 rc = -ENOENT; in __tree_connect_dfs_target()
4211 rc = dfs_cache_get_tgt_share(server->current_fullpath + 1, tit, &share, &prefix); in __tree_connect_dfs_target()
4212 if (rc) { in __tree_connect_dfs_target()
4213 cifs_dbg(VFS, "%s: failed to parse target share: %d\n", __func__, rc); in __tree_connect_dfs_target()
4217 rc = target_share_matches_server(server, tcp_host, tcp_host_len, share, in __tree_connect_dfs_target()
4219 if (rc) in __tree_connect_dfs_target()
4222 rc = -EHOSTUNREACH; in __tree_connect_dfs_target()
4228 rc = ops->tree_connect(xid, ipc->ses, tree, ipc, cifs_sb->local_nls); in __tree_connect_dfs_target()
4229 if (rc) in __tree_connect_dfs_target()
4235 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
4246 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
4247 if (rc) in __tree_connect_dfs_target()
4249 rc = dfs_cache_noreq_update_tgthint(server->current_fullpath + 1, tit); in __tree_connect_dfs_target()
4250 if (!rc) in __tree_connect_dfs_target()
4251 rc = cifs_update_super_prepath(cifs_sb, prefix); in __tree_connect_dfs_target()
4255 rc = update_server_fullpath(server, cifs_sb, target); in __tree_connect_dfs_target()
4258 if (!rc) { in __tree_connect_dfs_target()
4259 rc = -EREMOTE; in __tree_connect_dfs_target()
4272 return rc; in __tree_connect_dfs_target()
4279 int rc; in tree_connect_dfs_target() local
4284 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, tl, ref); in tree_connect_dfs_target()
4285 if (!rc || rc != -EREMOTE) in tree_connect_dfs_target()
4287 } while (rc = -ELOOP, ++num_links < MAX_NESTED_LINKS); in tree_connect_dfs_target()
4292 if (rc && server->current_fullpath != server->origin_fullpath) { in tree_connect_dfs_target()
4298 return rc; in tree_connect_dfs_target()
4303 int rc; in cifs_tree_connect() local
4318 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
4324 rc = PTR_ERR(sb); in cifs_tree_connect()
4325 cifs_dbg(VFS, "%s: could not find superblock: %d\n", __func__, rc); in cifs_tree_connect()
4334 rc = ops->tree_connect(xid, tcon->ses, tcon->treeName, tcon, cifs_sb->local_nls); in cifs_tree_connect()
4338 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, &tl, &ref); in cifs_tree_connect()
4344 return rc; in cifs_tree_connect()