• Home
  • Raw
  • Download

Lines Matching refs:rc

128 	int rc;  in __cifs_reconnect_tcon()  local
144 rc = CIFSTCon(0, tcon->ses, tree, tcon, nlsc); in __cifs_reconnect_tcon()
149 rc = CIFSTCon(0, tcon->ses, tcon->treeName, tcon, nlsc); in __cifs_reconnect_tcon()
153 rc = dfs_cache_noreq_find(tcon->dfs_path + 1, NULL, &tl); in __cifs_reconnect_tcon()
154 if (rc) in __cifs_reconnect_tcon()
177 rc = CIFSTCon(0, tcon->ses, tree, tcon, nlsc); in __cifs_reconnect_tcon()
178 if (!rc) in __cifs_reconnect_tcon()
180 if (rc == -EREMOTE) in __cifs_reconnect_tcon()
184 if (!rc) { in __cifs_reconnect_tcon()
186 rc = dfs_cache_noreq_update_tgthint(tcon->dfs_path + 1, in __cifs_reconnect_tcon()
189 rc = -ENOENT; in __cifs_reconnect_tcon()
194 return rc; in __cifs_reconnect_tcon()
208 int rc; in cifs_reconnect_tcon() local
247 rc = wait_event_interruptible_timeout(server->response_q, in cifs_reconnect_tcon()
250 if (rc < 0) { in cifs_reconnect_tcon()
292 rc = -EHOSTDOWN; in cifs_reconnect_tcon()
297 rc = cifs_negotiate_protocol(0, ses); in cifs_reconnect_tcon()
298 if (rc == 0 && ses->need_reconnect) in cifs_reconnect_tcon()
299 rc = cifs_setup_session(0, ses, nls_codepage); in cifs_reconnect_tcon()
302 if (rc || !tcon->need_reconnect) { in cifs_reconnect_tcon()
308 rc = __cifs_reconnect_tcon(nls_codepage, tcon); in cifs_reconnect_tcon()
310 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); in cifs_reconnect_tcon()
312 if (rc) { in cifs_reconnect_tcon()
313 printk_once(KERN_WARNING "reconnect tcon failed rc = %d\n", rc); in cifs_reconnect_tcon()
341 rc = -EAGAIN; in cifs_reconnect_tcon()
345 return rc; in cifs_reconnect_tcon()
355 int rc; in small_smb_init() local
357 rc = cifs_reconnect_tcon(tcon, smb_command); in small_smb_init()
358 if (rc) in small_smb_init()
359 return rc; in small_smb_init()
380 int rc; in small_smb_init_no_tc() local
383 rc = small_smb_init(smb_command, wct, NULL, request_buf); in small_smb_init_no_tc()
384 if (rc) in small_smb_init_no_tc()
385 return rc; in small_smb_init_no_tc()
399 return rc; in small_smb_init_no_tc()
433 int rc; in smb_init() local
435 rc = cifs_reconnect_tcon(tcon, smb_command); in smb_init()
436 if (rc) in smb_init()
437 return rc; in smb_init()
487 int rc = 0; in decode_ext_sec_blob() local
512 rc = decode_negTokenInit( in decode_ext_sec_blob()
514 if (rc != 1) in decode_ext_sec_blob()
670 int rc = 0; in CIFSSMBNegotiate() local
681 rc = smb_init(SMB_COM_NEGOTIATE, 0, NULL /* no tcon yet */ , in CIFSSMBNegotiate()
683 if (rc) in CIFSSMBNegotiate()
684 return rc; in CIFSSMBNegotiate()
708 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
710 if (rc != 0) in CIFSSMBNegotiate()
720 rc = -EOPNOTSUPP; in CIFSSMBNegotiate()
724 rc = decode_lanman_negprot_rsp(server, pSMBr); in CIFSSMBNegotiate()
728 rc = -EOPNOTSUPP; in CIFSSMBNegotiate()
757 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
759 rc = -EIO; /* no crypt key only if plain text pwd */ in CIFSSMBNegotiate()
766 if (!rc) in CIFSSMBNegotiate()
767 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
771 cifs_dbg(FYI, "negprot rc %d\n", rc); in CIFSSMBNegotiate()
772 return rc; in CIFSSMBNegotiate()
779 int rc = 0; in CIFSSMBTDis() local
796 rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon, in CIFSSMBTDis()
798 if (rc) in CIFSSMBTDis()
799 return rc; in CIFSSMBTDis()
801 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
803 if (rc) in CIFSSMBTDis()
804 cifs_dbg(FYI, "Tree disconnect failed %d\n", rc); in CIFSSMBTDis()
808 if (rc == -EAGAIN) in CIFSSMBTDis()
809 rc = 0; in CIFSSMBTDis()
811 return rc; in CIFSSMBTDis()
835 int rc = 0; in CIFSSMBEcho() local
842 rc = small_smb_init(SMB_COM_ECHO, 0, NULL, (void **)&smb); in CIFSSMBEcho()
843 if (rc) in CIFSSMBEcho()
844 return rc; in CIFSSMBEcho()
862 rc = cifs_call_async(server, &rqst, NULL, cifs_echo_callback, NULL, in CIFSSMBEcho()
864 if (rc) in CIFSSMBEcho()
865 cifs_dbg(FYI, "Echo request failed: %d\n", rc); in CIFSSMBEcho()
869 return rc; in CIFSSMBEcho()
876 int rc = 0; in CIFSSMBLogoff() local
892 rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB); in CIFSSMBLogoff()
893 if (rc) { in CIFSSMBLogoff()
895 return rc; in CIFSSMBLogoff()
906 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
914 if (rc == -EAGAIN) in CIFSSMBLogoff()
915 rc = 0; in CIFSSMBLogoff()
916 return rc; in CIFSSMBLogoff()
928 int rc = 0; in CIFSPOSIXDelFile() local
934 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSPOSIXDelFile()
936 if (rc) in CIFSPOSIXDelFile()
937 return rc; in CIFSPOSIXDelFile()
979 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
981 if (rc) in CIFSPOSIXDelFile()
982 cifs_dbg(FYI, "Posix delete returned %d\n", rc); in CIFSPOSIXDelFile()
987 if (rc == -EAGAIN) in CIFSPOSIXDelFile()
990 return rc; in CIFSPOSIXDelFile()
999 int rc = 0; in CIFSSMBDelFile() local
1005 rc = smb_init(SMB_COM_DELETE, 1, tcon, (void **) &pSMB, in CIFSSMBDelFile()
1007 if (rc) in CIFSSMBDelFile()
1008 return rc; in CIFSSMBDelFile()
1024 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
1027 if (rc) in CIFSSMBDelFile()
1028 cifs_dbg(FYI, "Error in RMFile = %d\n", rc); in CIFSSMBDelFile()
1031 if (rc == -EAGAIN) in CIFSSMBDelFile()
1034 return rc; in CIFSSMBDelFile()
1043 int rc = 0; in CIFSSMBRmDir() local
1050 rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB, in CIFSSMBRmDir()
1052 if (rc) in CIFSSMBRmDir()
1053 return rc; in CIFSSMBRmDir()
1068 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
1071 if (rc) in CIFSSMBRmDir()
1072 cifs_dbg(FYI, "Error in RMDir = %d\n", rc); in CIFSSMBRmDir()
1075 if (rc == -EAGAIN) in CIFSSMBRmDir()
1077 return rc; in CIFSSMBRmDir()
1085 int rc = 0; in CIFSSMBMkDir() local
1094 rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB, in CIFSSMBMkDir()
1096 if (rc) in CIFSSMBMkDir()
1097 return rc; in CIFSSMBMkDir()
1112 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
1115 if (rc) in CIFSSMBMkDir()
1116 cifs_dbg(FYI, "Error in Mkdir = %d\n", rc); in CIFSSMBMkDir()
1119 if (rc == -EAGAIN) in CIFSSMBMkDir()
1121 return rc; in CIFSSMBMkDir()
1134 int rc = 0; in CIFSPOSIXCreate() local
1142 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSPOSIXCreate()
1144 if (rc) in CIFSPOSIXCreate()
1145 return rc; in CIFSPOSIXCreate()
1189 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1191 if (rc) { in CIFSPOSIXCreate()
1192 cifs_dbg(FYI, "Posix create returned %d\n", rc); in CIFSPOSIXCreate()
1197 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSPOSIXCreate()
1199 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) { in CIFSPOSIXCreate()
1200 rc = -EIO; /* bad smb */ in CIFSPOSIXCreate()
1239 if (rc == -EAGAIN) in CIFSPOSIXCreate()
1242 return rc; in CIFSPOSIXCreate()
1296 int rc = -EACCES; in SMBLegacyOpen() local
1304 rc = smb_init(SMB_COM_OPEN_ANDX, 15, tcon, (void **) &pSMB, in SMBLegacyOpen()
1306 if (rc) in SMBLegacyOpen()
1307 return rc; in SMBLegacyOpen()
1353 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1356 if (rc) { in SMBLegacyOpen()
1357 cifs_dbg(FYI, "Error in Open = %d\n", rc); in SMBLegacyOpen()
1388 if (rc == -EAGAIN) in SMBLegacyOpen()
1390 return rc; in SMBLegacyOpen()
1397 int rc; in CIFS_open() local
1413 rc = smb_init(SMB_COM_NT_CREATE_ANDX, 24, tcon, (void **)&req, in CIFS_open()
1415 if (rc) in CIFS_open()
1416 return rc; in CIFS_open()
1477 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1480 if (rc) { in CIFS_open()
1481 cifs_dbg(FYI, "Error in Open = %d\n", rc); in CIFS_open()
1483 if (rc == -EAGAIN) in CIFS_open()
1485 return rc; in CIFS_open()
1509 return rc; in CIFS_open()
1714 int rc = 0; in cifs_readv_callback() local
1716 rc = cifs_verify_signature(&rqst, server, in cifs_readv_callback()
1718 if (rc) in cifs_readv_callback()
1720 rc); in cifs_readv_callback()
1749 int rc; in cifs_async_readv() local
1769 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **)&smb); in cifs_async_readv()
1770 if (rc) in cifs_async_readv()
1771 return rc; in cifs_async_readv()
1800 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1803 if (rc == 0) in cifs_async_readv()
1809 return rc; in cifs_async_readv()
1816 int rc = -EACCES; in CIFSSMBRead() local
1842 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **) &pSMB); in CIFSSMBRead()
1843 if (rc) in CIFSSMBRead()
1844 return rc; in CIFSSMBRead()
1873 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1878 if (rc) { in CIFSSMBRead()
1879 cifs_dbg(VFS, "Send error in read = %d\n", rc); in CIFSSMBRead()
1891 rc = -EIO; in CIFSSMBRead()
1918 return rc; in CIFSSMBRead()
1926 int rc = -EACCES; in CIFSSMBWrite() local
1954 rc = smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB, in CIFSSMBWrite()
1956 if (rc) in CIFSSMBWrite()
1957 return rc; in CIFSSMBWrite()
2016 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
2019 if (rc) { in CIFSSMBWrite()
2020 cifs_dbg(FYI, "Send error in write = %d\n", rc); in CIFSSMBWrite()
2040 return rc; in CIFSSMBWrite()
2069 int i, rc = 0; in cifs_writev_requeue() local
2085 rc = -ENOTSUPP; in cifs_writev_requeue()
2098 rc = -ENOMEM; in cifs_writev_requeue()
2115 rc = cifs_get_writable_file(CIFS_I(inode), false, in cifs_writev_requeue()
2119 rc); in cifs_writev_requeue()
2120 if (!is_retryable_error(rc)) in cifs_writev_requeue()
2121 rc = -EBADF; in cifs_writev_requeue()
2124 rc = server->ops->async_writev(wdata2, in cifs_writev_requeue()
2130 if (rc != 0 && !is_retryable_error(rc)) { in cifs_writev_requeue()
2137 if (rc) { in cifs_writev_requeue()
2139 if (is_retryable_error(rc)) in cifs_writev_requeue()
2156 if (rc != 0 && !is_retryable_error(rc)) in cifs_writev_requeue()
2157 mapping_set_error(inode->i_mapping, rc); in cifs_writev_requeue()
2274 int rc = -EACCES; in cifs_async_writev() local
2291 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **)&smb); in cifs_async_writev()
2292 if (rc) in cifs_async_writev()
2343 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2346 if (rc == 0) in cifs_async_writev()
2353 return rc; in cifs_async_writev()
2360 int rc = -EACCES; in CIFSSMBWrite2() local
2385 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB); in CIFSSMBWrite2()
2386 if (rc) in CIFSSMBWrite2()
2387 return rc; in CIFSSMBWrite2()
2429 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
2433 if (rc) { in CIFSSMBWrite2()
2434 cifs_dbg(FYI, "Send error Write2 = %d\n", rc); in CIFSSMBWrite2()
2437 rc = -EIO; in CIFSSMBWrite2()
2458 return rc; in CIFSSMBWrite2()
2465 int rc = 0; in cifs_lockv() local
2475 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); in cifs_lockv()
2476 if (rc) in cifs_lockv()
2477 return rc; in cifs_lockv()
2497 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, in cifs_lockv()
2500 if (rc) in cifs_lockv()
2501 cifs_dbg(FYI, "Send error in cifs_lockv = %d\n", rc); in cifs_lockv()
2503 return rc; in cifs_lockv()
2513 int rc = 0; in CIFSSMBLock() local
2522 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); in CIFSSMBLock()
2524 if (rc) in CIFSSMBLock()
2525 return rc; in CIFSSMBLock()
2561 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, in CIFSSMBLock()
2564 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2567 if (rc) in CIFSSMBLock()
2568 cifs_dbg(FYI, "Send error in Lock = %d\n", rc); in CIFSSMBLock()
2572 return rc; in CIFSSMBLock()
2585 int rc = 0; in CIFSSMBPosixLock() local
2595 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBPosixLock()
2597 if (rc) in CIFSSMBPosixLock()
2598 return rc; in CIFSSMBPosixLock()
2647 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, in CIFSSMBPosixLock()
2652 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2658 if (rc) { in CIFSSMBPosixLock()
2659 cifs_dbg(FYI, "Send error in Posix Lock = %d\n", rc); in CIFSSMBPosixLock()
2664 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBPosixLock()
2666 if (rc || get_bcc(&pSMBr->hdr) < sizeof(*parm_data)) { in CIFSSMBPosixLock()
2667 rc = -EIO; /* bad smb */ in CIFSSMBPosixLock()
2673 rc = -EIO; in CIFSSMBPosixLock()
2701 return rc; in CIFSSMBPosixLock()
2708 int rc = 0; in CIFSSMBClose() local
2713 rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); in CIFSSMBClose()
2714 if (rc == -EAGAIN) in CIFSSMBClose()
2716 if (rc) in CIFSSMBClose()
2717 return rc; in CIFSSMBClose()
2722 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2725 if (rc) { in CIFSSMBClose()
2726 if (rc != -EINTR) { in CIFSSMBClose()
2728 cifs_dbg(VFS, "Send error in Close = %d\n", rc); in CIFSSMBClose()
2733 if (rc == -EAGAIN) in CIFSSMBClose()
2734 rc = 0; in CIFSSMBClose()
2736 return rc; in CIFSSMBClose()
2742 int rc = 0; in CIFSSMBFlush() local
2746 rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB); in CIFSSMBFlush()
2747 if (rc) in CIFSSMBFlush()
2748 return rc; in CIFSSMBFlush()
2752 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2755 if (rc) in CIFSSMBFlush()
2756 cifs_dbg(VFS, "Send error in Flush = %d\n", rc); in CIFSSMBFlush()
2758 return rc; in CIFSSMBFlush()
2766 int rc = 0; in CIFSSMBRename() local
2776 rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB, in CIFSSMBRename()
2778 if (rc) in CIFSSMBRename()
2779 return rc; in CIFSSMBRename()
2812 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2815 if (rc) in CIFSSMBRename()
2816 cifs_dbg(FYI, "Send error in rename = %d\n", rc); in CIFSSMBRename()
2820 if (rc == -EAGAIN) in CIFSSMBRename()
2823 return rc; in CIFSSMBRename()
2835 int rc = 0; in CIFSSMBRenameOpenFile() local
2841 rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB, in CIFSSMBRenameOpenFile()
2843 if (rc) in CIFSSMBRenameOpenFile()
2844 return rc; in CIFSSMBRenameOpenFile()
2893 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2896 if (rc) in CIFSSMBRenameOpenFile()
2898 rc); in CIFSSMBRenameOpenFile()
2905 return rc; in CIFSSMBRenameOpenFile()
2913 int rc = 0; in CIFSSMBCopy() local
2922 rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB, in CIFSSMBCopy()
2924 if (rc) in CIFSSMBCopy()
2925 return rc; in CIFSSMBCopy()
2957 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2959 if (rc) { in CIFSSMBCopy()
2961 rc, le16_to_cpu(pSMBr->CopyCount)); in CIFSSMBCopy()
2965 if (rc == -EAGAIN) in CIFSSMBCopy()
2968 return rc; in CIFSSMBCopy()
2981 int rc = 0; in CIFSUnixCreateSymLink() local
2987 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSUnixCreateSymLink()
2989 if (rc) in CIFSUnixCreateSymLink()
2990 return rc; in CIFSUnixCreateSymLink()
3042 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
3045 if (rc) in CIFSUnixCreateSymLink()
3047 rc); in CIFSUnixCreateSymLink()
3051 if (rc == -EAGAIN) in CIFSUnixCreateSymLink()
3054 return rc; in CIFSUnixCreateSymLink()
3067 int rc = 0; in CIFSUnixCreateHardLink() local
3073 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSUnixCreateHardLink()
3075 if (rc) in CIFSUnixCreateHardLink()
3076 return rc; in CIFSUnixCreateHardLink()
3125 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
3128 if (rc) in CIFSUnixCreateHardLink()
3130 rc); in CIFSUnixCreateHardLink()
3133 if (rc == -EAGAIN) in CIFSUnixCreateHardLink()
3136 return rc; in CIFSUnixCreateHardLink()
3144 int rc = 0; in CIFSCreateHardLink() local
3155 rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB, in CIFSCreateHardLink()
3157 if (rc) in CIFSCreateHardLink()
3158 return rc; in CIFSCreateHardLink()
3195 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3198 if (rc) in CIFSCreateHardLink()
3199 cifs_dbg(FYI, "Send error in hard link (NT rename) = %d\n", rc); in CIFSCreateHardLink()
3202 if (rc == -EAGAIN) in CIFSCreateHardLink()
3205 return rc; in CIFSCreateHardLink()
3216 int rc = 0; in CIFSSMBUnixQuerySymLink() local
3225 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQuerySymLink()
3227 if (rc) in CIFSSMBUnixQuerySymLink()
3228 return rc; in CIFSSMBUnixQuerySymLink()
3265 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3267 if (rc) { in CIFSSMBUnixQuerySymLink()
3268 cifs_dbg(FYI, "Send error in QuerySymLinkInfo = %d\n", rc); in CIFSSMBUnixQuerySymLink()
3272 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQuerySymLink()
3274 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBUnixQuerySymLink()
3275 rc = -EIO; in CIFSSMBUnixQuerySymLink()
3292 rc = -ENOMEM; in CIFSSMBUnixQuerySymLink()
3296 if (rc == -EAGAIN) in CIFSSMBUnixQuerySymLink()
3298 return rc; in CIFSSMBUnixQuerySymLink()
3316 int rc = 0; in CIFSSMBQuerySymLink() local
3329 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, in CIFSSMBQuerySymLink()
3331 if (rc) in CIFSSMBQuerySymLink()
3332 return rc; in CIFSSMBQuerySymLink()
3353 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3355 if (rc) { in CIFSSMBQuerySymLink()
3356 cifs_dbg(FYI, "Send error in QueryReparseLinkInfo = %d\n", rc); in CIFSSMBQuerySymLink()
3364 rc = -EIO; /* bad smb */ in CIFSSMBQuerySymLink()
3368 rc = -EIO; in CIFSSMBQuerySymLink()
3376 rc = -EIO; in CIFSSMBQuerySymLink()
3386 rc = -EOPNOTSUPP; in CIFSSMBQuerySymLink()
3393 rc = -EIO; in CIFSSMBQuerySymLink()
3401 rc = -EOPNOTSUPP; in CIFSSMBQuerySymLink()
3411 rc = -EIO; in CIFSSMBQuerySymLink()
3423 rc = -ENOMEM; in CIFSSMBQuerySymLink()
3431 return rc; in CIFSSMBQuerySymLink()
3438 int rc = 0; in CIFSSMB_set_compression() local
3444 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, in CIFSSMB_set_compression()
3446 if (rc) in CIFSSMB_set_compression()
3447 return rc; in CIFSSMB_set_compression()
3473 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3475 if (rc) in CIFSSMB_set_compression()
3476 cifs_dbg(FYI, "Send error in SetCompression = %d\n", rc); in CIFSSMB_set_compression()
3484 return rc; in CIFSSMB_set_compression()
3585 __u16 rc = 0; in ACL_to_cifs_posix() local
3616 if (rc == 0) { in ACL_to_cifs_posix()
3617 rc = (__u16)(count * sizeof(struct cifs_posix_ace)); in ACL_to_cifs_posix()
3618 rc += sizeof(struct cifs_posix_acl); in ACL_to_cifs_posix()
3621 return rc; in ACL_to_cifs_posix()
3633 int rc = 0; in CIFSSMBGetPosixACL() local
3641 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBGetPosixACL()
3643 if (rc) in CIFSSMBGetPosixACL()
3644 return rc; in CIFSSMBGetPosixACL()
3685 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3688 if (rc) { in CIFSSMBGetPosixACL()
3689 cifs_dbg(FYI, "Send error in Query POSIX ACL = %d\n", rc); in CIFSSMBGetPosixACL()
3693 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBGetPosixACL()
3695 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBGetPosixACL()
3696 rc = -EIO; /* bad smb */ in CIFSSMBGetPosixACL()
3700 rc = cifs_copy_posix_acl(acl_inf, in CIFSSMBGetPosixACL()
3706 if (rc == -EAGAIN) in CIFSSMBGetPosixACL()
3708 return rc; in CIFSSMBGetPosixACL()
3722 int rc = 0; in CIFSSMBSetPosixACL() local
3728 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetPosixACL()
3730 if (rc) in CIFSSMBSetPosixACL()
3731 return rc; in CIFSSMBSetPosixACL()
3760 rc = -EOPNOTSUPP; in CIFSSMBSetPosixACL()
3776 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3778 if (rc) in CIFSSMBSetPosixACL()
3779 cifs_dbg(FYI, "Set POSIX ACL returned %d\n", rc); in CIFSSMBSetPosixACL()
3783 if (rc == -EAGAIN) in CIFSSMBSetPosixACL()
3785 return rc; in CIFSSMBSetPosixACL()
3793 int rc = 0; in CIFSGetExtAttr() local
3804 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSGetExtAttr()
3806 if (rc) in CIFSGetExtAttr()
3807 return rc; in CIFSGetExtAttr()
3835 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3837 if (rc) { in CIFSGetExtAttr()
3838 cifs_dbg(FYI, "error %d in GetExtAttr\n", rc); in CIFSGetExtAttr()
3841 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetExtAttr()
3843 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetExtAttr()
3846 rc = -EIO; /* bad smb */ in CIFSGetExtAttr()
3854 rc = -EIO; in CIFSGetExtAttr()
3865 if (rc == -EAGAIN) in CIFSGetExtAttr()
3867 return rc; in CIFSGetExtAttr()
3885 int rc; in smb_init_nttransact() local
3889 rc = small_smb_init(SMB_COM_NT_TRANSACT, 19 + setup_count, tcon, in smb_init_nttransact()
3891 if (rc) in smb_init_nttransact()
3892 return rc; in smb_init_nttransact()
3967 int rc = 0; in CIFSSMBGetCIFSACL() local
3978 rc = smb_init_nttransact(NT_TRANSACT_QUERY_SECURITY_DESC, 0, in CIFSSMBGetCIFSACL()
3980 if (rc) in CIFSSMBGetCIFSACL()
3981 return rc; in CIFSSMBGetCIFSACL()
3994 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3998 if (rc) { in CIFSSMBGetCIFSACL()
3999 cifs_dbg(FYI, "Send error in QuerySecDesc = %d\n", rc); in CIFSSMBGetCIFSACL()
4008 rc = validate_ntransact(rsp_iov.iov_base, (char **)&parm, in CIFSSMBGetCIFSACL()
4010 if (rc) in CIFSSMBGetCIFSACL()
4018 rc = -EIO; /* bad smb */ in CIFSSMBGetCIFSACL()
4038 rc = -EINVAL; in CIFSSMBGetCIFSACL()
4044 rc = -ENOMEM; in CIFSSMBGetCIFSACL()
4050 return rc; in CIFSSMBGetCIFSACL()
4058 int rc = 0; in CIFSSMBSetCIFSACL() local
4064 rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB, &pSMBr); in CIFSSMBSetCIFSACL()
4065 if (rc) in CIFSSMBSetCIFSACL()
4066 return rc; in CIFSSMBSetCIFSACL()
4100 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
4104 bytes_returned, rc); in CIFSSMBSetCIFSACL()
4105 if (rc) in CIFSSMBSetCIFSACL()
4106 cifs_dbg(FYI, "Set CIFS ACL returned %d\n", rc); in CIFSSMBSetCIFSACL()
4109 if (rc == -EAGAIN) in CIFSSMBSetCIFSACL()
4112 return (rc); in CIFSSMBSetCIFSACL()
4125 int rc = 0; in SMBQueryInformation() local
4131 rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB, in SMBQueryInformation()
4133 if (rc) in SMBQueryInformation()
4134 return rc; in SMBQueryInformation()
4151 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
4153 if (rc) { in SMBQueryInformation()
4154 cifs_dbg(FYI, "Send error in QueryInfo = %d\n", rc); in SMBQueryInformation()
4174 rc = -EIO; /* bad buffer passed in */ in SMBQueryInformation()
4178 if (rc == -EAGAIN) in SMBQueryInformation()
4181 return rc; in SMBQueryInformation()
4190 int rc = 0; in CIFSSMBQFileInfo() local
4195 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFileInfo()
4197 if (rc) in CIFSSMBQFileInfo()
4198 return rc; in CIFSSMBQFileInfo()
4226 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4228 if (rc) { in CIFSSMBQFileInfo()
4229 cifs_dbg(FYI, "Send error in QFileInfo = %d", rc); in CIFSSMBQFileInfo()
4231 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFileInfo()
4233 if (rc) /* BB add auto retry on EOPNOTSUPP? */ in CIFSSMBQFileInfo()
4234 rc = -EIO; in CIFSSMBQFileInfo()
4236 rc = -EIO; /* bad smb */ in CIFSSMBQFileInfo()
4243 rc = -ENOMEM; in CIFSSMBQFileInfo()
4246 if (rc == -EAGAIN) in CIFSSMBQFileInfo()
4249 return rc; in CIFSSMBQFileInfo()
4261 int rc = 0; in CIFSSMBQPathInfo() local
4268 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQPathInfo()
4270 if (rc) in CIFSSMBQPathInfo()
4271 return rc; in CIFSSMBQPathInfo()
4311 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4313 if (rc) { in CIFSSMBQPathInfo()
4314 cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); in CIFSSMBQPathInfo()
4316 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQPathInfo()
4318 if (rc) /* BB add auto retry on EOPNOTSUPP? */ in CIFSSMBQPathInfo()
4319 rc = -EIO; in CIFSSMBQPathInfo()
4321 rc = -EIO; /* bad smb */ in CIFSSMBQPathInfo()
4323 rc = -EIO; /* 24 or 26 expected but we do not read in CIFSSMBQPathInfo()
4342 rc = -ENOMEM; in CIFSSMBQPathInfo()
4345 if (rc == -EAGAIN) in CIFSSMBQPathInfo()
4348 return rc; in CIFSSMBQPathInfo()
4357 int rc = 0; in CIFSSMBUnixQFileInfo() local
4362 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQFileInfo()
4364 if (rc) in CIFSSMBUnixQFileInfo()
4365 return rc; in CIFSSMBUnixQFileInfo()
4393 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4395 if (rc) { in CIFSSMBUnixQFileInfo()
4396 cifs_dbg(FYI, "Send error in UnixQFileInfo = %d", rc); in CIFSSMBUnixQFileInfo()
4398 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQFileInfo()
4400 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQFileInfo()
4402 rc = -EIO; /* bad smb */ in CIFSSMBUnixQFileInfo()
4413 if (rc == -EAGAIN) in CIFSSMBUnixQFileInfo()
4416 return rc; in CIFSSMBUnixQFileInfo()
4428 int rc = 0; in CIFSSMBUnixQPathInfo() local
4435 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQPathInfo()
4437 if (rc) in CIFSSMBUnixQPathInfo()
4438 return rc; in CIFSSMBUnixQPathInfo()
4475 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4477 if (rc) { in CIFSSMBUnixQPathInfo()
4478 cifs_dbg(FYI, "Send error in UnixQPathInfo = %d", rc); in CIFSSMBUnixQPathInfo()
4480 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQPathInfo()
4482 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQPathInfo()
4484 rc = -EIO; /* bad smb */ in CIFSSMBUnixQPathInfo()
4494 if (rc == -EAGAIN) in CIFSSMBUnixQPathInfo()
4497 return rc; in CIFSSMBUnixQPathInfo()
4511 int rc = 0; in CIFSFindFirst() local
4520 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSFindFirst()
4522 if (rc) in CIFSFindFirst()
4523 return rc; in CIFSFindFirst()
4592 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4596 if (rc) {/* BB add logic to retry regular search if Unix search in CIFSFindFirst()
4599 cifs_dbg(FYI, "Error in FindFirst = %d\n", rc); in CIFSFindFirst()
4605 if (rc == -EAGAIN) in CIFSFindFirst()
4609 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSFindFirst()
4610 if (rc == 0) { in CIFSFindFirst()
4639 return rc; in CIFSFindFirst()
4652 return rc; in CIFSFindFirst()
4663 int rc = 0; in CIFSFindNext() local
4673 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSFindNext()
4675 if (rc) in CIFSFindNext()
4676 return rc; in CIFSFindNext()
4711 rc = -EINVAL; in CIFSFindNext()
4720 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4723 if (rc) { in CIFSFindNext()
4724 if (rc == -EBADF) { in CIFSFindNext()
4727 rc = 0; /* search probably was closed at end of search*/ in CIFSFindNext()
4729 cifs_dbg(FYI, "FindNext returned = %d\n", rc); in CIFSFindNext()
4731 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSFindNext()
4733 if (rc == 0) { in CIFSFindNext()
4766 return rc; in CIFSFindNext()
4785 if (rc != 0) in CIFSFindNext()
4787 return rc; in CIFSFindNext()
4794 int rc = 0; in CIFSFindClose() local
4798 rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); in CIFSFindClose()
4802 if (rc == -EAGAIN) in CIFSFindClose()
4804 if (rc) in CIFSFindClose()
4805 return rc; in CIFSFindClose()
4809 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4811 if (rc) in CIFSFindClose()
4812 cifs_dbg(VFS, "Send error in FindClose = %d\n", rc); in CIFSFindClose()
4817 if (rc == -EAGAIN) in CIFSFindClose()
4818 rc = 0; in CIFSFindClose()
4820 return rc; in CIFSFindClose()
4828 int rc = 0; in CIFSGetSrvInodeNumber() local
4839 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSGetSrvInodeNumber()
4841 if (rc) in CIFSGetSrvInodeNumber()
4842 return rc; in CIFSGetSrvInodeNumber()
4880 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4882 if (rc) { in CIFSGetSrvInodeNumber()
4883 cifs_dbg(FYI, "error %d in QueryInternalInfo\n", rc); in CIFSGetSrvInodeNumber()
4886 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetSrvInodeNumber()
4888 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetSrvInodeNumber()
4891 rc = -EIO; /* bad smb */ in CIFSGetSrvInodeNumber()
4899 rc = -EIO; in CIFSGetSrvInodeNumber()
4909 if (rc == -EAGAIN) in CIFSGetSrvInodeNumber()
4911 return rc; in CIFSGetSrvInodeNumber()
4923 int rc = 0; in CIFSGetDFSRefer() local
4935 rc = smb_init(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, (void **) &pSMB, in CIFSGetDFSRefer()
4937 if (rc) in CIFSGetDFSRefer()
4938 return rc; in CIFSGetDFSRefer()
4991 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
4993 if (rc) { in CIFSGetDFSRefer()
4994 cifs_dbg(FYI, "Send error in GetDFSRefer = %d\n", rc); in CIFSGetDFSRefer()
4997 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetDFSRefer()
5000 if (rc || get_bcc(&pSMBr->hdr) < 17) { in CIFSGetDFSRefer()
5001 rc = -EIO; /* bad smb */ in CIFSGetDFSRefer()
5009 rc = parse_dfs_referrals(&pSMBr->dfs_data, in CIFSGetDFSRefer()
5018 if (rc == -EAGAIN) in CIFSGetDFSRefer()
5021 return rc; in CIFSGetDFSRefer()
5033 int rc = 0; in SMBOldQFSInfo() local
5039 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in SMBOldQFSInfo()
5041 if (rc) in SMBOldQFSInfo()
5042 return rc; in SMBOldQFSInfo()
5067 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
5069 if (rc) { in SMBOldQFSInfo()
5070 cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); in SMBOldQFSInfo()
5072 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in SMBOldQFSInfo()
5074 if (rc || get_bcc(&pSMBr->hdr) < 18) in SMBOldQFSInfo()
5075 rc = -EIO; /* bad smb */ in SMBOldQFSInfo()
5106 if (rc == -EAGAIN) in SMBOldQFSInfo()
5109 return rc; in SMBOldQFSInfo()
5120 int rc = 0; in CIFSSMBQFSInfo() local
5126 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSInfo()
5128 if (rc) in CIFSSMBQFSInfo()
5129 return rc; in CIFSSMBQFSInfo()
5154 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
5156 if (rc) { in CIFSSMBQFSInfo()
5157 cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); in CIFSSMBQFSInfo()
5159 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSInfo()
5161 if (rc || get_bcc(&pSMBr->hdr) < 24) in CIFSSMBQFSInfo()
5162 rc = -EIO; /* bad smb */ in CIFSSMBQFSInfo()
5193 if (rc == -EAGAIN) in CIFSSMBQFSInfo()
5196 return rc; in CIFSSMBQFSInfo()
5206 int rc = 0; in CIFSSMBQFSAttributeInfo() local
5212 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSAttributeInfo()
5214 if (rc) in CIFSSMBQFSAttributeInfo()
5215 return rc; in CIFSSMBQFSAttributeInfo()
5241 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5243 if (rc) { in CIFSSMBQFSAttributeInfo()
5244 cifs_dbg(VFS, "Send error in QFSAttributeInfo = %d\n", rc); in CIFSSMBQFSAttributeInfo()
5246 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSAttributeInfo()
5248 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSAttributeInfo()
5250 rc = -EIO; /* bad smb */ in CIFSSMBQFSAttributeInfo()
5263 if (rc == -EAGAIN) in CIFSSMBQFSAttributeInfo()
5266 return rc; in CIFSSMBQFSAttributeInfo()
5276 int rc = 0; in CIFSSMBQFSDeviceInfo() local
5282 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSDeviceInfo()
5284 if (rc) in CIFSSMBQFSDeviceInfo()
5285 return rc; in CIFSSMBQFSDeviceInfo()
5312 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5314 if (rc) { in CIFSSMBQFSDeviceInfo()
5315 cifs_dbg(FYI, "Send error in QFSDeviceInfo = %d\n", rc); in CIFSSMBQFSDeviceInfo()
5317 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSDeviceInfo()
5319 if (rc || get_bcc(&pSMBr->hdr) < in CIFSSMBQFSDeviceInfo()
5321 rc = -EIO; /* bad smb */ in CIFSSMBQFSDeviceInfo()
5334 if (rc == -EAGAIN) in CIFSSMBQFSDeviceInfo()
5337 return rc; in CIFSSMBQFSDeviceInfo()
5347 int rc = 0; in CIFSSMBQFSUnixInfo() local
5353 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, in CIFSSMBQFSUnixInfo()
5355 if (rc) in CIFSSMBQFSUnixInfo()
5356 return rc; in CIFSSMBQFSUnixInfo()
5382 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5384 if (rc) { in CIFSSMBQFSUnixInfo()
5385 cifs_dbg(VFS, "Send error in QFSUnixInfo = %d\n", rc); in CIFSSMBQFSUnixInfo()
5387 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSUnixInfo()
5389 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSUnixInfo()
5390 rc = -EIO; /* bad smb */ in CIFSSMBQFSUnixInfo()
5403 if (rc == -EAGAIN) in CIFSSMBQFSUnixInfo()
5407 return rc; in CIFSSMBQFSUnixInfo()
5416 int rc = 0; in CIFSSMBSetFSUnixInfo() local
5423 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, in CIFSSMBSetFSUnixInfo()
5425 if (rc) in CIFSSMBSetFSUnixInfo()
5426 return rc; in CIFSSMBSetFSUnixInfo()
5465 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5467 if (rc) { in CIFSSMBSetFSUnixInfo()
5468 cifs_dbg(VFS, "Send error in SETFSUnixInfo = %d\n", rc); in CIFSSMBSetFSUnixInfo()
5470 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBSetFSUnixInfo()
5471 if (rc) in CIFSSMBSetFSUnixInfo()
5472 rc = -EIO; /* bad smb */ in CIFSSMBSetFSUnixInfo()
5476 if (rc == -EAGAIN) in CIFSSMBSetFSUnixInfo()
5479 return rc; in CIFSSMBSetFSUnixInfo()
5492 int rc = 0; in CIFSSMBQFSPosixInfo() local
5498 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSPosixInfo()
5500 if (rc) in CIFSSMBQFSPosixInfo()
5501 return rc; in CIFSSMBQFSPosixInfo()
5527 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5529 if (rc) { in CIFSSMBQFSPosixInfo()
5530 cifs_dbg(FYI, "Send error in QFSUnixInfo = %d\n", rc); in CIFSSMBQFSPosixInfo()
5532 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSPosixInfo()
5534 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSPosixInfo()
5535 rc = -EIO; /* bad smb */ in CIFSSMBQFSPosixInfo()
5571 if (rc == -EAGAIN) in CIFSSMBQFSPosixInfo()
5574 return rc; in CIFSSMBQFSPosixInfo()
5593 int rc = 0; in CIFSSMBSetEOF() local
5601 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetEOF()
5603 if (rc) in CIFSSMBSetEOF()
5604 return rc; in CIFSSMBSetEOF()
5660 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5662 if (rc) in CIFSSMBSetEOF()
5663 cifs_dbg(FYI, "SetPathInfo (file size) returned %d\n", rc); in CIFSSMBSetEOF()
5667 if (rc == -EAGAIN) in CIFSSMBSetEOF()
5670 return rc; in CIFSSMBSetEOF()
5679 int rc = 0; in CIFSSMBSetFileSize() local
5684 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileSize()
5686 if (rc) in CIFSSMBSetFileSize()
5687 return rc; in CIFSSMBSetFileSize()
5738 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5740 if (rc) { in CIFSSMBSetFileSize()
5742 rc); in CIFSSMBSetFileSize()
5748 return rc; in CIFSSMBSetFileSize()
5763 int rc = 0; in CIFSSMBSetFileInfo() local
5767 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileInfo()
5769 if (rc) in CIFSSMBSetFileInfo()
5770 return rc; in CIFSSMBSetFileInfo()
5810 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5812 if (rc) in CIFSSMBSetFileInfo()
5814 rc); in CIFSSMBSetFileInfo()
5819 return rc; in CIFSSMBSetFileInfo()
5828 int rc = 0; in CIFSSMBSetFileDisposition() local
5832 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileDisposition()
5834 if (rc) in CIFSSMBSetFileDisposition()
5835 return rc; in CIFSSMBSetFileDisposition()
5871 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5873 if (rc) in CIFSSMBSetFileDisposition()
5874 cifs_dbg(FYI, "Send error in SetFileDisposition = %d\n", rc); in CIFSSMBSetFileDisposition()
5876 return rc; in CIFSSMBSetFileDisposition()
5887 int rc = 0; in CIFSSMBSetPathInfo() local
5895 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetPathInfo()
5897 if (rc) in CIFSSMBSetPathInfo()
5898 return rc; in CIFSSMBSetPathInfo()
5943 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5945 if (rc) in CIFSSMBSetPathInfo()
5946 cifs_dbg(FYI, "SetPathInfo (times) returned %d\n", rc); in CIFSSMBSetPathInfo()
5950 if (rc == -EAGAIN) in CIFSSMBSetPathInfo()
5953 return rc; in CIFSSMBSetPathInfo()
5967 int rc = 0;
5974 rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB,
5976 if (rc)
5977 return rc;
5992 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
5994 if (rc)
5995 cifs_dbg(FYI, "Error in LegacySetAttr = %d\n", rc);
5999 if (rc == -EAGAIN)
6002 return rc;
6060 int rc = 0; in CIFSSMBUnixSetFileInfo() local
6064 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBUnixSetFileInfo()
6066 if (rc) in CIFSSMBUnixSetFileInfo()
6067 return rc; in CIFSSMBUnixSetFileInfo()
6107 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
6109 if (rc) in CIFSSMBUnixSetFileInfo()
6111 rc); in CIFSSMBUnixSetFileInfo()
6116 return rc; in CIFSSMBUnixSetFileInfo()
6128 int rc = 0; in CIFSSMBUnixSetPathInfo() local
6135 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixSetPathInfo()
6137 if (rc) in CIFSSMBUnixSetPathInfo()
6138 return rc; in CIFSSMBUnixSetPathInfo()
6184 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
6186 if (rc) in CIFSSMBUnixSetPathInfo()
6187 cifs_dbg(FYI, "SetPathInfo (perms) returned %d\n", rc); in CIFSSMBUnixSetPathInfo()
6190 if (rc == -EAGAIN) in CIFSSMBUnixSetPathInfo()
6192 return rc; in CIFSSMBUnixSetPathInfo()
6216 int rc = 0; in CIFSSMBQAllEAs() local
6228 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQAllEAs()
6230 if (rc) in CIFSSMBQAllEAs()
6231 return rc; in CIFSSMBQAllEAs()
6268 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6270 if (rc) { in CIFSSMBQAllEAs()
6271 cifs_dbg(FYI, "Send error in QueryAllEAs = %d\n", rc); in CIFSSMBQAllEAs()
6280 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQAllEAs()
6281 if (rc || get_bcc(&pSMBr->hdr) < 4) { in CIFSSMBQAllEAs()
6282 rc = -EIO; /* bad smb */ in CIFSSMBQAllEAs()
6304 rc = -ENODATA; in CIFSSMBQAllEAs()
6312 rc = -EIO; in CIFSSMBQAllEAs()
6329 rc = -EIO; in CIFSSMBQAllEAs()
6338 rc = -EIO; in CIFSSMBQAllEAs()
6346 rc = value_len; in CIFSSMBQAllEAs()
6350 rc = -ERANGE; in CIFSSMBQAllEAs()
6358 rc += (5 + 1 + name_len); in CIFSSMBQAllEAs()
6359 if (rc < (int) buf_size) { in CIFSSMBQAllEAs()
6371 rc = -ERANGE; in CIFSSMBQAllEAs()
6381 rc = -ENODATA; in CIFSSMBQAllEAs()
6385 if (rc == -EAGAIN) in CIFSSMBQAllEAs()
6388 return (ssize_t)rc; in CIFSSMBQAllEAs()
6401 int rc = 0; in CIFSSMBSetEA() local
6408 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetEA()
6410 if (rc) in CIFSSMBSetEA()
6411 return rc; in CIFSSMBSetEA()
6481 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()
6483 if (rc) in CIFSSMBSetEA()
6484 cifs_dbg(FYI, "SetPathInfo (EA) returned %d\n", rc); in CIFSSMBSetEA()
6488 if (rc == -EAGAIN) in CIFSSMBSetEA()
6491 return rc; in CIFSSMBSetEA()