Lines Matching refs:rc

71 	int *val, rc = -1;
102 rc = change_conf(server);
146 switch (rc) {
223 int rc = 0;
241 rc = wait_event_killable(server->request_q,
244 if (rc)
245 return rc;
281 return rc;
425 int rc;
430 rc = SMB2_negotiate(xid, ses, server);
432 if (rc == -EAGAIN)
433 rc = -EHOSTDOWN;
434 return rc;
584 int rc = 0, ret = 0;
618 rc = -EOPNOTSUPP;
694 rc = -ENOMEM;
730 rc = -EINVAL;
755 return rc;
761 int rc;
773 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID,
777 if (rc == -EOPNOTSUPP) {
781 } else if (rc != 0) {
782 cifs_tcon_dbg(VFS, "error %d on ioctl to get interface list\n", rc);
786 rc = parse_server_interfaces(out_buf, ret_data_len, ses, in_mount);
787 if (rc)
802 return rc;
809 int rc;
825 rc = open_cached_dir(xid, tcon, "", cifs_sb, false, &cfid);
826 if (rc == 0)
829 rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL, NULL,
831 if (rc)
854 int rc;
869 rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL, NULL,
871 if (rc)
893 int rc, rc2;
895 rc = open_cached_dir(xid, tcon, full_path, cifs_sb, true, &cfid);
896 if (!rc) {
917 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL,
919 if (rc) {
925 if (rc != -EREMOTE && hdr->Status == STATUS_OBJECT_NAME_INVALID) {
929 rc = rc2;
933 rc = -EREMOTE;
935 if (rc == -EREMOTE && IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) && cifs_sb &&
937 rc = -EOPNOTSUPP;
941 rc = SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
946 return rc;
976 int rc = 0;
991 rc = -EIO;
1001 rc = value_len;
1005 rc = -ERANGE;
1017 rc += user_name_len;
1026 rc += user_name_len;
1029 rc = -ERANGE;
1039 rc = -ERANGE;
1049 rc = -ENODATA;
1052 return (ssize_t)rc;
1061 int rc;
1067 rc = smb2_query_info_compound(xid, tcon, path,
1075 if (rc) {
1081 if (!ea_name && rc == -ENODATA)
1082 rc = 0;
1087 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset),
1091 if (rc)
1096 rc = move_smb2_ea_to_cifs(ea_data, buf_size, info,
1101 return rc;
1127 int rc, used_len = 0;
1149 rc = -ENOMEM;
1157 rc = ses->server->ops->query_all_EAs(xid, tcon, path,
1160 if (rc == -ENODATA)
1168 rc = smb2_query_info_compound(xid, tcon, path,
1176 if (rc == 0) {
1183 rc = 0;
1191 rc = -ENOSPC;
1211 rc = SMB2_open_init(tcon, server,
1213 if (rc)
1225 rc = -ENOMEM;
1237 rc = SMB2_set_info_init(tcon, server,
1242 if (rc)
1250 rc = SMB2_close_init(tcon, server,
1252 if (rc)
1262 rc = compound_send_recv(xid, ses, server,
1279 if (is_replayable_error(rc) &&
1283 return rc;
1428 int rc;
1430 rc = __SMB2_close(xid, tcon, cfile->fid.persistent_fid,
1432 if (rc)
1433 return rc;
1462 return rc;
1470 int rc;
1474 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid,
1478 if (rc == -EOPNOTSUPP) {
1481 } else if (rc) {
1482 cifs_tcon_dbg(VFS, "refcpy ioctl error %d getting resume key\n", rc);
1487 rc = -EINVAL;
1494 return rc;
1512 int rc = 0;
1542 rc = -EFAULT;
1546 rc = -EINVAL;
1551 rc = -EIO;
1561 rc = PTR_ERR(buffer);
1599 rc = SMB2_open_init(tcon, server,
1601 if (rc)
1609 rc = -EPERM;
1615 rc = SMB2_ioctl_init(tcon, server, &rqst[1], COMPOUND_FID, COMPOUND_FID,
1623 rc = -EPERM;
1627 rc = -EINVAL;
1637 rc = SMB2_set_info_init(tcon, server, &rqst[1], COMPOUND_FID, COMPOUND_FID,
1645 rc = SMB2_query_info_init(tcon, server,
1655 rc = -EINVAL;
1658 if (rc)
1667 rc = SMB2_close_init(tcon, server,
1669 if (rc)
1679 rc = compound_send_recv(xid, ses, server,
1682 if (rc)
1694 rc = -EFAULT;
1701 rc = -EFAULT;
1708 rc = -EFAULT;
1717 rc = -EFAULT;
1723 rc = -EFAULT;
1740 if (is_replayable_error(rc) &&
1744 return rc;
1753 int rc;
1768 rc = SMB2_request_res_key(xid, tlink_tcon(srcfile->tlink),
1772 /* Note: request_res_key sets res_key null only if rc !=0 */
1773 if (rc)
1792 rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid,
1796 if (rc == 0) {
1800 rc = -EIO;
1805 rc = -EIO;
1814 rc = -EIO;
1819 rc = -EIO;
1834 } else if (rc == -EINVAL) {
1870 if (rc)
1871 return rc;
1929 int rc;
1953 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid,
1956 if (rc) {
1958 cifs_dbg(FYI, "set sparse rc = %d\n", rc);
1999 int rc;
2020 rc = smb2_set_file_size(xid, tcon, trgtfile, dest_off + len, false);
2021 if (rc)
2033 rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid,
2045 return rc;
2092 int rc;
2119 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid,
2126 rc, ret_data_len);
2127 if (rc)
2128 return rc;
2134 rc = -EFAULT;
2136 return rc;
2161 rc = -EFAULT;
2165 return rc;
2187 int rc = 0;
2192 rc = PTR_ERR(path);
2198 rc = -ENOMEM;
2204 rc = -EFAULT;
2209 rc = -EFAULT;
2225 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL, NULL,
2227 if (rc)
2230 rc = SMB2_change_notify(xid, tcon, fid.persistent_fid, fid.volatile_fid,
2236 cifs_dbg(FYI, "change notify for path %s rc %d\n", path, rc);
2242 rc = -EFAULT;
2244 rc = -EFAULT;
2250 return rc;
2265 int rc, flags = 0;
2305 rc = SMB2_open_init(tcon, server,
2307 if (rc)
2319 rc = SMB2_query_directory_init(xid, tcon, server,
2323 if (rc)
2333 rc = compound_send_recv(xid, tcon->ses, server,
2340 cifs_dbg(FYI, "query_dir_first: open failed rc=%d\n", rc);
2347 if (rc && rc != -ENODATA) {
2349 cifs_dbg(FYI, "query_dir_first: query directory failed rc=%d\n", rc);
2351 tcon->tid, tcon->ses->Suid, 0, 0, rc);
2362 rc = 0;
2366 rc = smb2_parse_query_directory(tcon, &rsp_iov[1], resp_buftype[1],
2368 if (rc) {
2370 tcon->ses->Suid, 0, 0, rc);
2385 if (is_replayable_error(rc) &&
2389 return rc;
2645 int rc;
2668 rc = -ENOMEM;
2694 rc = SMB2_open_init(tcon, server,
2696 if (rc)
2704 rc = SMB2_query_info_init(tcon, server,
2712 rc = SMB2_query_info_init(tcon, server,
2720 if (rc)
2730 rc = SMB2_close_init(tcon, server,
2732 if (rc)
2745 rc = compound_send_recv(xid, ses, server,
2749 rc = compound_send_recv(xid, ses, server,
2753 if (rc) {
2755 if (rc == -EREMCHG) {
2777 if (is_replayable_error(rc) &&
2781 return rc;
2792 int rc;
2795 rc = smb2_query_info_compound(xid, tcon, "",
2801 if (rc)
2808 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset),
2812 if (!rc)
2816 trace_smb3_qfs_done(xid, tcon->tid, tcon->ses->Suid, tcon->tree_name, rc);
2818 return rc;
2825 int rc;
2843 rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL, NULL,
2845 if (rc)
2846 return rc;
2848 rc = SMB311_posix_qfs_info(xid, tcon, fid.persistent_fid,
2852 return rc;
2898 int rc;
2929 rc = -ENOTCONN;
2937 rc = -ENOMEM;
2944 rc = -ENOMEM;
2955 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID,
2959 if (!is_retryable_error(rc))
2964 if (!rc && !dfs_rsp)
2965 rc = -EIO;
2966 if (rc) {
2967 if (!is_retryable_error(rc) && rc != -ENOENT && rc != -EOPNOTSUPP)
2968 cifs_tcon_dbg(VFS, "%s: ioctl error: rc=%d\n", __func__, rc);
2972 rc = parse_dfs_referrals(dfs_rsp, dfs_rsp_size,
2976 if (rc) {
2977 cifs_tcon_dbg(VFS, "parse error in %s rc=%d\n", __func__, rc);
2995 return rc;
3004 int rc = -EOPNOTSUPP;
3013 rc = SMB2_query_acl(xid, tlink_tcon(tlink), cifsfid->persistent_fid,
3020 cifs_dbg(FYI, "%s: rc = %d ACL len %d\n", __func__, rc, *pacllen);
3021 if (rc)
3022 return ERR_PTR(rc);
3034 int rc;
3050 rc = -ENOMEM;
3052 return ERR_PTR(rc);
3074 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL, NULL,
3077 if (!rc) {
3078 rc = SMB2_query_acl(xid, tlink_tcon(tlink), fid.persistent_fid,
3087 cifs_dbg(FYI, "%s: rc = %d ACL len %d\n", __func__, rc, *pacllen);
3088 if (rc)
3089 return ERR_PTR(rc);
3099 int rc, access_flags = 0;
3123 rc = -ENOMEM;
3125 return rc;
3137 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL,
3140 if (!rc) {
3141 rc = SMB2_set_acl(xid, tlink_tcon(tlink), fid.persistent_fid,
3148 return rc;
3196 long rc;
3214 rc = -EOPNOTSUPP;
3218 rc = smb3_zero_data(file, tcon, offset, len, xid);
3219 if (rc < 0)
3227 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid,
3229 if (rc >= 0) {
3242 if (rc)
3244 ses->Suid, offset, len, rc);
3248 return rc;
3257 long rc;
3267 rc = -EOPNOTSUPP;
3283 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid,
3292 return rc;
3303 int rc = 0;
3320 rc = SMB2_write(xid, &io_parms, &nbytes, iov, 1);
3321 if (rc)
3329 return rc;
3341 int rc;
3345 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid,
3351 if (rc)
3356 rc = -ENOMEM;
3366 rc = smb3_simple_fallocate_write_range(xid, tcon,
3372 rc = -EINVAL;
3385 rc = smb3_simple_fallocate_write_range(xid, tcon,
3387 if (rc)
3412 return rc;
3422 long rc = -EOPNOTSUPP;
3437 tcon->tid, tcon->ses->Suid, off, len, rc);
3439 return rc;
3446 rc = inode_newsize_ok(inode, off + len);
3447 if (rc)
3454 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid,
3456 if (rc == 0) {
3471 rc = 0;
3481 rc = 0;
3509 rc = smb3_simple_fallocate_range(xid, tcon, cfile,
3523 rc = -EOPNOTSUPP;
3529 rc = 0;
3532 if (rc)
3534 tcon->ses->Suid, off, len, rc);
3540 return rc;
3546 int rc;
3561 rc = -EINVAL;
3566 rc = filemap_write_and_wait_range(inode->i_mapping, off, old_eof - 1);
3567 if (rc < 0)
3573 rc = smb2_copychunk_range(xid, cfile, cfile, off + len,
3575 if (rc < 0)
3579 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid,
3581 if (rc < 0)
3584 rc = 0;
3595 return rc;
3601 int rc;
3614 rc = -EINVAL;
3622 rc = filemap_write_and_wait_range(inode->i_mapping, off, new_eof - 1);
3623 if (rc < 0)
3627 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid,
3629 if (rc < 0)
3636 rc = smb2_copychunk_range(xid, cfile, cfile, off, count, off + len);
3637 if (rc < 0)
3640 rc = smb3_zero_data(file, tcon, off, len, xid);
3641 if (rc < 0)
3644 rc = 0;
3650 return rc;
3658 int rc = 0;
3696 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid,
3702 if (rc == -E2BIG)
3703 rc = 0;
3704 if (rc)
3711 rc = -ENXIO;
3716 rc = -EINVAL;
3731 if (!rc)
3734 return rc;
3744 int i, num, rc, flags, last_blob;
3747 rc = fiemap_prep(d_inode(cfile->dentry), fei, start, &len, 0);
3748 if (rc)
3749 return rc;
3756 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid,
3762 if (rc == -E2BIG) {
3764 rc = 0;
3767 if (rc)
3771 rc = -EINVAL;
3775 rc = -EINVAL;
3785 rc = fiemap_fill_next_extent(fei,
3790 if (rc < 0)
3792 if (rc == 1) {
3793 rc = 0;
3809 return rc;
4143 ssize_t rc;
4173 rc = extract_iter_to_sg(iter, count, &sgtable,
4175 iov_iter_revert(iter, rc);
4227 int rc = 0;
4239 rc = smb2_get_enc_key(server, le64_to_cpu(tr_hdr->SessionId), enc, key);
4240 if (rc) {
4243 return rc;
4246 rc = smb3_crypto_aead_allocate(server);
4247 if (rc) {
4249 return rc;
4256 rc = crypto_aead_setkey(tfm, key, SMB3_GCM256_CRYPTKEY_SIZE);
4258 rc = crypto_aead_setkey(tfm, key, SMB3_GCM128_CRYPTKEY_SIZE);
4260 if (rc) {
4261 cifs_server_dbg(VFS, "%s: Failed to set aead key %d\n", __func__, rc);
4262 return rc;
4265 rc = crypto_aead_setauthsize(tfm, SMB2_SIGNATURE_SIZE);
4266 if (rc) {
4267 cifs_server_dbg(VFS, "%s: Failed to set authsize %d\n", __func__, rc);
4268 return rc;
4296 rc = crypto_wait_req(enc ? crypto_aead_encrypt(req)
4299 if (!rc && enc)
4303 return rc;
4354 int rc = -ENOMEM;
4374 rc = -ENOMEM;
4381 rc = xa_err(o);
4390 rc = -EFAULT;
4404 rc = crypt_message(server, num_rqst, new_rq, 1);
4405 cifs_dbg(FYI, "Encrypt message returned %d\n", rc);
4406 if (rc)
4409 return rc;
4413 return rc;
4432 int rc;
4447 rc = crypt_message(server, 1, &rqst, 0);
4448 cifs_dbg(FYI, "Decrypt message returned %d\n", rc);
4450 if (rc)
4451 return rc;
4458 return rc;
4644 int rc;
4649 rc = decrypt_raw_data(dw->server, dw->buf, dw->server->vals->read_rsp_size,
4651 if (rc) {
4652 cifs_dbg(VFS, "error decrypting rc=%d\n", rc);
4662 rc = handle_read_data(dw->server, mid, dw->buf,
4666 if (rc >= 0) {
4713 int rc;
4728 rc = cifs_read_from_socket(server, buf + HEADER_SIZE(server) - 1, len);
4729 if (rc < 0)
4731 server->total_read += rc;
4738 rc = -ENOMEM;
4748 rc = xa_err(old);
4758 rc = cifs_read_iter_from_socket(server, &iter, dw->len);
4759 if (rc < 0)
4762 server->total_read += rc;
4763 if (rc < npages * PAGE_SIZE)
4764 iov_iter_zero(npages * PAGE_SIZE - rc, &iter);
4768 rc = cifs_discard_remaining_data(server);
4769 if (rc)
4787 rc = decrypt_raw_data(server, buf, server->vals->read_rsp_size,
4789 if (rc)
4798 rc = handle_read_data(server, *mid, buf,
4801 if (rc >= 0) {
4813 return rc;
4985 int rc;
5010 rc = server->ops->open(xid, &oparms, &oplock, NULL);
5011 if (rc)
5012 return rc;
5020 rc = server->ops->sync_write(xid, &fid, &io_parms,
5023 return rc;
5031 int rc;
5033 rc = __cifs_sfu_make_node(xid, inode, dentry, tcon,
5035 if (rc)
5036 return rc;
5039 rc = smb311_posix_get_inode_info(&new, full_path, NULL,
5042 rc = cifs_get_inode_info_unix(&new, full_path,
5045 rc = cifs_get_inode_info(&new, full_path, NULL,
5048 if (!rc)
5050 return rc;
5058 int rc;
5067 rc = cifs_sfu_make_node(xid, inode, dentry, tcon,
5070 rc = smb2_mknod_reparse(xid, inode, dentry, tcon,
5073 return rc;