• Home
  • Raw
  • Download

Lines Matching refs:rc

131 	int rc;  in cifs_reconnect_tcon()  local
170 rc = wait_event_interruptible_timeout(server->response_q, in cifs_reconnect_tcon()
173 if (rc < 0) { in cifs_reconnect_tcon()
215 rc = -EHOSTDOWN; in cifs_reconnect_tcon()
220 rc = cifs_negotiate_protocol(0, ses); in cifs_reconnect_tcon()
221 if (rc == 0 && ses->need_reconnect) in cifs_reconnect_tcon()
222 rc = cifs_setup_session(0, ses, nls_codepage); in cifs_reconnect_tcon()
225 if (rc || !tcon->need_reconnect) { in cifs_reconnect_tcon()
231 rc = cifs_tree_connect(0, tcon, nls_codepage); in cifs_reconnect_tcon()
233 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); in cifs_reconnect_tcon()
235 if (rc) { in cifs_reconnect_tcon()
236 pr_warn_once("reconnect tcon failed rc = %d\n", rc); in cifs_reconnect_tcon()
264 rc = -EAGAIN; in cifs_reconnect_tcon()
268 return rc; in cifs_reconnect_tcon()
278 int rc; in small_smb_init() local
280 rc = cifs_reconnect_tcon(tcon, smb_command); in small_smb_init()
281 if (rc) in small_smb_init()
282 return rc; in small_smb_init()
303 int rc; in small_smb_init_no_tc() local
306 rc = small_smb_init(smb_command, wct, NULL, request_buf); in small_smb_init_no_tc()
307 if (rc) in small_smb_init_no_tc()
308 return rc; in small_smb_init_no_tc()
322 return rc; in small_smb_init_no_tc()
356 int rc; in smb_init() local
358 rc = cifs_reconnect_tcon(tcon, smb_command); in smb_init()
359 if (rc) in smb_init()
360 return rc; in smb_init()
410 int rc = 0; in decode_ext_sec_blob() local
435 rc = decode_negTokenInit( in decode_ext_sec_blob()
437 if (rc != 1) in decode_ext_sec_blob()
595 int rc = 0; in CIFSSMBNegotiate() local
606 rc = smb_init(SMB_COM_NEGOTIATE, 0, NULL /* no tcon yet */ , in CIFSSMBNegotiate()
608 if (rc) in CIFSSMBNegotiate()
609 return rc; in CIFSSMBNegotiate()
633 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
635 if (rc != 0) in CIFSSMBNegotiate()
645 rc = -EOPNOTSUPP; in CIFSSMBNegotiate()
649 rc = decode_lanman_negprot_rsp(server, pSMBr); in CIFSSMBNegotiate()
653 rc = -EOPNOTSUPP; in CIFSSMBNegotiate()
684 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
686 rc = -EIO; /* no crypt key only if plain text pwd */ in CIFSSMBNegotiate()
693 if (!rc) in CIFSSMBNegotiate()
694 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
698 cifs_dbg(FYI, "negprot rc %d\n", rc); in CIFSSMBNegotiate()
699 return rc; in CIFSSMBNegotiate()
706 int rc = 0; in CIFSSMBTDis() local
723 rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon, in CIFSSMBTDis()
725 if (rc) in CIFSSMBTDis()
726 return rc; in CIFSSMBTDis()
728 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
730 if (rc) in CIFSSMBTDis()
731 cifs_dbg(FYI, "Tree disconnect failed %d\n", rc); in CIFSSMBTDis()
735 if (rc == -EAGAIN) in CIFSSMBTDis()
736 rc = 0; in CIFSSMBTDis()
738 return rc; in CIFSSMBTDis()
762 int rc = 0; in CIFSSMBEcho() local
769 rc = small_smb_init(SMB_COM_ECHO, 0, NULL, (void **)&smb); in CIFSSMBEcho()
770 if (rc) in CIFSSMBEcho()
771 return rc; in CIFSSMBEcho()
789 rc = cifs_call_async(server, &rqst, NULL, cifs_echo_callback, NULL, in CIFSSMBEcho()
791 if (rc) in CIFSSMBEcho()
792 cifs_dbg(FYI, "Echo request failed: %d\n", rc); in CIFSSMBEcho()
796 return rc; in CIFSSMBEcho()
803 int rc = 0; in CIFSSMBLogoff() local
819 rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB); in CIFSSMBLogoff()
820 if (rc) { in CIFSSMBLogoff()
822 return rc; in CIFSSMBLogoff()
833 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
841 if (rc == -EAGAIN) in CIFSSMBLogoff()
842 rc = 0; in CIFSSMBLogoff()
843 return rc; in CIFSSMBLogoff()
855 int rc = 0; in CIFSPOSIXDelFile() local
861 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSPOSIXDelFile()
863 if (rc) in CIFSPOSIXDelFile()
864 return rc; in CIFSPOSIXDelFile()
906 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
908 if (rc) in CIFSPOSIXDelFile()
909 cifs_dbg(FYI, "Posix delete returned %d\n", rc); in CIFSPOSIXDelFile()
914 if (rc == -EAGAIN) in CIFSPOSIXDelFile()
917 return rc; in CIFSPOSIXDelFile()
926 int rc = 0; in CIFSSMBDelFile() local
932 rc = smb_init(SMB_COM_DELETE, 1, tcon, (void **) &pSMB, in CIFSSMBDelFile()
934 if (rc) in CIFSSMBDelFile()
935 return rc; in CIFSSMBDelFile()
951 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
954 if (rc) in CIFSSMBDelFile()
955 cifs_dbg(FYI, "Error in RMFile = %d\n", rc); in CIFSSMBDelFile()
958 if (rc == -EAGAIN) in CIFSSMBDelFile()
961 return rc; in CIFSSMBDelFile()
970 int rc = 0; in CIFSSMBRmDir() local
977 rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB, in CIFSSMBRmDir()
979 if (rc) in CIFSSMBRmDir()
980 return rc; in CIFSSMBRmDir()
995 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
998 if (rc) in CIFSSMBRmDir()
999 cifs_dbg(FYI, "Error in RMDir = %d\n", rc); in CIFSSMBRmDir()
1002 if (rc == -EAGAIN) in CIFSSMBRmDir()
1004 return rc; in CIFSSMBRmDir()
1012 int rc = 0; in CIFSSMBMkDir() local
1021 rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB, in CIFSSMBMkDir()
1023 if (rc) in CIFSSMBMkDir()
1024 return rc; in CIFSSMBMkDir()
1039 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
1042 if (rc) in CIFSSMBMkDir()
1043 cifs_dbg(FYI, "Error in Mkdir = %d\n", rc); in CIFSSMBMkDir()
1046 if (rc == -EAGAIN) in CIFSSMBMkDir()
1048 return rc; in CIFSSMBMkDir()
1061 int rc = 0; in CIFSPOSIXCreate() local
1069 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSPOSIXCreate()
1071 if (rc) in CIFSPOSIXCreate()
1072 return rc; in CIFSPOSIXCreate()
1116 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1118 if (rc) { in CIFSPOSIXCreate()
1119 cifs_dbg(FYI, "Posix create returned %d\n", rc); in CIFSPOSIXCreate()
1124 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSPOSIXCreate()
1126 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) { in CIFSPOSIXCreate()
1127 rc = -EIO; /* bad smb */ in CIFSPOSIXCreate()
1166 if (rc == -EAGAIN) in CIFSPOSIXCreate()
1169 return rc; in CIFSPOSIXCreate()
1223 int rc = -EACCES; in SMBLegacyOpen() local
1231 rc = smb_init(SMB_COM_OPEN_ANDX, 15, tcon, (void **) &pSMB, in SMBLegacyOpen()
1233 if (rc) in SMBLegacyOpen()
1234 return rc; in SMBLegacyOpen()
1280 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1283 if (rc) { in SMBLegacyOpen()
1284 cifs_dbg(FYI, "Error in Open = %d\n", rc); in SMBLegacyOpen()
1315 if (rc == -EAGAIN) in SMBLegacyOpen()
1317 return rc; in SMBLegacyOpen()
1324 int rc; in CIFS_open() local
1340 rc = smb_init(SMB_COM_NT_CREATE_ANDX, 24, tcon, (void **)&req, in CIFS_open()
1342 if (rc) in CIFS_open()
1343 return rc; in CIFS_open()
1404 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1407 if (rc) { in CIFS_open()
1408 cifs_dbg(FYI, "Error in Open = %d\n", rc); in CIFS_open()
1410 if (rc == -EAGAIN) in CIFS_open()
1412 return rc; in CIFS_open()
1437 return rc; in CIFS_open()
1641 int rc = 0; in cifs_readv_callback() local
1643 rc = cifs_verify_signature(&rqst, server, in cifs_readv_callback()
1645 if (rc) in cifs_readv_callback()
1647 rc); in cifs_readv_callback()
1676 int rc; in cifs_async_readv() local
1696 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **)&smb); in cifs_async_readv()
1697 if (rc) in cifs_async_readv()
1698 return rc; in cifs_async_readv()
1727 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1730 if (rc == 0) in cifs_async_readv()
1736 return rc; in cifs_async_readv()
1743 int rc = -EACCES; in CIFSSMBRead() local
1769 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **) &pSMB); in CIFSSMBRead()
1770 if (rc) in CIFSSMBRead()
1771 return rc; in CIFSSMBRead()
1800 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1805 if (rc) { in CIFSSMBRead()
1806 cifs_dbg(VFS, "Send error in read = %d\n", rc); in CIFSSMBRead()
1818 rc = -EIO; in CIFSSMBRead()
1845 return rc; in CIFSSMBRead()
1853 int rc = -EACCES; in CIFSSMBWrite() local
1881 rc = smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB, in CIFSSMBWrite()
1883 if (rc) in CIFSSMBWrite()
1884 return rc; in CIFSSMBWrite()
1943 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1946 if (rc) { in CIFSSMBWrite()
1947 cifs_dbg(FYI, "Send error in write = %d\n", rc); in CIFSSMBWrite()
1967 return rc; in CIFSSMBWrite()
1996 int i, rc = 0; in cifs_writev_requeue() local
2012 rc = -ENOTSUPP; in cifs_writev_requeue()
2025 rc = -ENOMEM; in cifs_writev_requeue()
2042 rc = cifs_get_writable_file(CIFS_I(inode), FIND_WR_ANY, in cifs_writev_requeue()
2046 rc); in cifs_writev_requeue()
2047 if (!is_retryable_error(rc)) in cifs_writev_requeue()
2048 rc = -EBADF; in cifs_writev_requeue()
2051 rc = server->ops->async_writev(wdata2, in cifs_writev_requeue()
2057 if (rc != 0 && !is_retryable_error(rc)) { in cifs_writev_requeue()
2065 if (rc) { in cifs_writev_requeue()
2066 if (is_retryable_error(rc)) in cifs_writev_requeue()
2083 if (rc != 0 && !is_retryable_error(rc)) in cifs_writev_requeue()
2084 mapping_set_error(inode->i_mapping, rc); in cifs_writev_requeue()
2201 int rc = -EACCES; in cifs_async_writev() local
2218 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **)&smb); in cifs_async_writev()
2219 if (rc) in cifs_async_writev()
2270 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2273 if (rc == 0) in cifs_async_writev()
2280 return rc; in cifs_async_writev()
2287 int rc; in CIFSSMBWrite2() local
2312 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB); in CIFSSMBWrite2()
2313 if (rc) in CIFSSMBWrite2()
2314 return rc; in CIFSSMBWrite2()
2356 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
2360 if (rc) { in CIFSSMBWrite2()
2361 cifs_dbg(FYI, "Send error Write2 = %d\n", rc); in CIFSSMBWrite2()
2364 rc = -EIO; in CIFSSMBWrite2()
2385 return rc; in CIFSSMBWrite2()
2392 int rc = 0; in cifs_lockv() local
2402 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); in cifs_lockv()
2403 if (rc) in cifs_lockv()
2404 return rc; in cifs_lockv()
2424 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, in cifs_lockv()
2427 if (rc) in cifs_lockv()
2428 cifs_dbg(FYI, "Send error in cifs_lockv = %d\n", rc); in cifs_lockv()
2430 return rc; in cifs_lockv()
2440 int rc = 0; in CIFSSMBLock() local
2449 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); in CIFSSMBLock()
2451 if (rc) in CIFSSMBLock()
2452 return rc; in CIFSSMBLock()
2488 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, in CIFSSMBLock()
2491 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2494 if (rc) in CIFSSMBLock()
2495 cifs_dbg(FYI, "Send error in Lock = %d\n", rc); in CIFSSMBLock()
2499 return rc; in CIFSSMBLock()
2512 int rc = 0; in CIFSSMBPosixLock() local
2522 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBPosixLock()
2524 if (rc) in CIFSSMBPosixLock()
2525 return rc; in CIFSSMBPosixLock()
2574 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, in CIFSSMBPosixLock()
2579 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2585 if (rc) { in CIFSSMBPosixLock()
2586 cifs_dbg(FYI, "Send error in Posix Lock = %d\n", rc); in CIFSSMBPosixLock()
2591 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBPosixLock()
2593 if (rc || get_bcc(&pSMBr->hdr) < sizeof(*parm_data)) { in CIFSSMBPosixLock()
2594 rc = -EIO; /* bad smb */ in CIFSSMBPosixLock()
2600 rc = -EIO; in CIFSSMBPosixLock()
2628 return rc; in CIFSSMBPosixLock()
2635 int rc = 0; in CIFSSMBClose() local
2640 rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); in CIFSSMBClose()
2641 if (rc == -EAGAIN) in CIFSSMBClose()
2643 if (rc) in CIFSSMBClose()
2644 return rc; in CIFSSMBClose()
2649 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2652 if (rc) { in CIFSSMBClose()
2653 if (rc != -EINTR) { in CIFSSMBClose()
2655 cifs_dbg(VFS, "Send error in Close = %d\n", rc); in CIFSSMBClose()
2660 if (rc == -EAGAIN) in CIFSSMBClose()
2661 rc = 0; in CIFSSMBClose()
2663 return rc; in CIFSSMBClose()
2669 int rc = 0; in CIFSSMBFlush() local
2673 rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB); in CIFSSMBFlush()
2674 if (rc) in CIFSSMBFlush()
2675 return rc; in CIFSSMBFlush()
2679 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2682 if (rc) in CIFSSMBFlush()
2683 cifs_dbg(VFS, "Send error in Flush = %d\n", rc); in CIFSSMBFlush()
2685 return rc; in CIFSSMBFlush()
2693 int rc = 0; in CIFSSMBRename() local
2703 rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB, in CIFSSMBRename()
2705 if (rc) in CIFSSMBRename()
2706 return rc; in CIFSSMBRename()
2739 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2742 if (rc) in CIFSSMBRename()
2743 cifs_dbg(FYI, "Send error in rename = %d\n", rc); in CIFSSMBRename()
2747 if (rc == -EAGAIN) in CIFSSMBRename()
2750 return rc; in CIFSSMBRename()
2762 int rc = 0; in CIFSSMBRenameOpenFile() local
2768 rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB, in CIFSSMBRenameOpenFile()
2770 if (rc) in CIFSSMBRenameOpenFile()
2771 return rc; in CIFSSMBRenameOpenFile()
2820 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2823 if (rc) in CIFSSMBRenameOpenFile()
2825 rc); in CIFSSMBRenameOpenFile()
2832 return rc; in CIFSSMBRenameOpenFile()
2840 int rc = 0; in CIFSSMBCopy() local
2849 rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB, in CIFSSMBCopy()
2851 if (rc) in CIFSSMBCopy()
2852 return rc; in CIFSSMBCopy()
2884 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2886 if (rc) { in CIFSSMBCopy()
2888 rc, le16_to_cpu(pSMBr->CopyCount)); in CIFSSMBCopy()
2892 if (rc == -EAGAIN) in CIFSSMBCopy()
2895 return rc; in CIFSSMBCopy()
2908 int rc = 0; in CIFSUnixCreateSymLink() local
2914 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSUnixCreateSymLink()
2916 if (rc) in CIFSUnixCreateSymLink()
2917 return rc; in CIFSUnixCreateSymLink()
2969 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2972 if (rc) in CIFSUnixCreateSymLink()
2974 rc); in CIFSUnixCreateSymLink()
2978 if (rc == -EAGAIN) in CIFSUnixCreateSymLink()
2981 return rc; in CIFSUnixCreateSymLink()
2994 int rc = 0; in CIFSUnixCreateHardLink() local
3000 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSUnixCreateHardLink()
3002 if (rc) in CIFSUnixCreateHardLink()
3003 return rc; in CIFSUnixCreateHardLink()
3052 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
3055 if (rc) in CIFSUnixCreateHardLink()
3057 rc); in CIFSUnixCreateHardLink()
3060 if (rc == -EAGAIN) in CIFSUnixCreateHardLink()
3063 return rc; in CIFSUnixCreateHardLink()
3071 int rc = 0; in CIFSCreateHardLink() local
3082 rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB, in CIFSCreateHardLink()
3084 if (rc) in CIFSCreateHardLink()
3085 return rc; in CIFSCreateHardLink()
3122 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3125 if (rc) in CIFSCreateHardLink()
3126 cifs_dbg(FYI, "Send error in hard link (NT rename) = %d\n", rc); in CIFSCreateHardLink()
3129 if (rc == -EAGAIN) in CIFSCreateHardLink()
3132 return rc; in CIFSCreateHardLink()
3143 int rc = 0; in CIFSSMBUnixQuerySymLink() local
3152 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQuerySymLink()
3154 if (rc) in CIFSSMBUnixQuerySymLink()
3155 return rc; in CIFSSMBUnixQuerySymLink()
3192 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3194 if (rc) { in CIFSSMBUnixQuerySymLink()
3195 cifs_dbg(FYI, "Send error in QuerySymLinkInfo = %d\n", rc); in CIFSSMBUnixQuerySymLink()
3199 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQuerySymLink()
3201 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBUnixQuerySymLink()
3202 rc = -EIO; in CIFSSMBUnixQuerySymLink()
3219 rc = -ENOMEM; in CIFSSMBUnixQuerySymLink()
3223 if (rc == -EAGAIN) in CIFSSMBUnixQuerySymLink()
3225 return rc; in CIFSSMBUnixQuerySymLink()
3243 int rc = 0; in CIFSSMBQuerySymLink() local
3256 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, in CIFSSMBQuerySymLink()
3258 if (rc) in CIFSSMBQuerySymLink()
3259 return rc; in CIFSSMBQuerySymLink()
3280 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3282 if (rc) { in CIFSSMBQuerySymLink()
3283 cifs_dbg(FYI, "Send error in QueryReparseLinkInfo = %d\n", rc); in CIFSSMBQuerySymLink()
3291 rc = -EIO; /* bad smb */ in CIFSSMBQuerySymLink()
3295 rc = -EIO; in CIFSSMBQuerySymLink()
3303 rc = -EIO; in CIFSSMBQuerySymLink()
3313 rc = -EOPNOTSUPP; in CIFSSMBQuerySymLink()
3320 rc = -EIO; in CIFSSMBQuerySymLink()
3328 rc = -EOPNOTSUPP; in CIFSSMBQuerySymLink()
3338 rc = -EIO; in CIFSSMBQuerySymLink()
3350 rc = -ENOMEM; in CIFSSMBQuerySymLink()
3358 return rc; in CIFSSMBQuerySymLink()
3365 int rc = 0; in CIFSSMB_set_compression() local
3371 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, in CIFSSMB_set_compression()
3373 if (rc) in CIFSSMB_set_compression()
3374 return rc; in CIFSSMB_set_compression()
3400 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3402 if (rc) in CIFSSMB_set_compression()
3403 cifs_dbg(FYI, "Send error in SetCompression = %d\n", rc); in CIFSSMB_set_compression()
3411 return rc; in CIFSSMB_set_compression()
3512 __u16 rc = 0; in ACL_to_cifs_posix() local
3543 if (rc == 0) { in ACL_to_cifs_posix()
3544 rc = (__u16)(count * sizeof(struct cifs_posix_ace)); in ACL_to_cifs_posix()
3545 rc += sizeof(struct cifs_posix_acl); in ACL_to_cifs_posix()
3548 return rc; in ACL_to_cifs_posix()
3560 int rc = 0; in CIFSSMBGetPosixACL() local
3568 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBGetPosixACL()
3570 if (rc) in CIFSSMBGetPosixACL()
3571 return rc; in CIFSSMBGetPosixACL()
3612 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3615 if (rc) { in CIFSSMBGetPosixACL()
3616 cifs_dbg(FYI, "Send error in Query POSIX ACL = %d\n", rc); in CIFSSMBGetPosixACL()
3620 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBGetPosixACL()
3622 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBGetPosixACL()
3623 rc = -EIO; /* bad smb */ in CIFSSMBGetPosixACL()
3627 rc = cifs_copy_posix_acl(acl_inf, in CIFSSMBGetPosixACL()
3633 if (rc == -EAGAIN) in CIFSSMBGetPosixACL()
3635 return rc; in CIFSSMBGetPosixACL()
3649 int rc = 0; in CIFSSMBSetPosixACL() local
3655 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetPosixACL()
3657 if (rc) in CIFSSMBSetPosixACL()
3658 return rc; in CIFSSMBSetPosixACL()
3687 rc = -EOPNOTSUPP; in CIFSSMBSetPosixACL()
3703 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3705 if (rc) in CIFSSMBSetPosixACL()
3706 cifs_dbg(FYI, "Set POSIX ACL returned %d\n", rc); in CIFSSMBSetPosixACL()
3710 if (rc == -EAGAIN) in CIFSSMBSetPosixACL()
3712 return rc; in CIFSSMBSetPosixACL()
3720 int rc = 0; in CIFSGetExtAttr() local
3731 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSGetExtAttr()
3733 if (rc) in CIFSGetExtAttr()
3734 return rc; in CIFSGetExtAttr()
3762 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3764 if (rc) { in CIFSGetExtAttr()
3765 cifs_dbg(FYI, "error %d in GetExtAttr\n", rc); in CIFSGetExtAttr()
3768 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetExtAttr()
3770 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetExtAttr()
3773 rc = -EIO; /* bad smb */ in CIFSGetExtAttr()
3781 rc = -EIO; in CIFSGetExtAttr()
3792 if (rc == -EAGAIN) in CIFSGetExtAttr()
3794 return rc; in CIFSGetExtAttr()
3812 int rc; in smb_init_nttransact() local
3816 rc = small_smb_init(SMB_COM_NT_TRANSACT, 19 + setup_count, tcon, in smb_init_nttransact()
3818 if (rc) in smb_init_nttransact()
3819 return rc; in smb_init_nttransact()
3894 int rc = 0; in CIFSSMBGetCIFSACL() local
3905 rc = smb_init_nttransact(NT_TRANSACT_QUERY_SECURITY_DESC, 0, in CIFSSMBGetCIFSACL()
3907 if (rc) in CIFSSMBGetCIFSACL()
3908 return rc; in CIFSSMBGetCIFSACL()
3921 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3925 if (rc) { in CIFSSMBGetCIFSACL()
3926 cifs_dbg(FYI, "Send error in QuerySecDesc = %d\n", rc); in CIFSSMBGetCIFSACL()
3935 rc = validate_ntransact(rsp_iov.iov_base, (char **)&parm, in CIFSSMBGetCIFSACL()
3937 if (rc) in CIFSSMBGetCIFSACL()
3945 rc = -EIO; /* bad smb */ in CIFSSMBGetCIFSACL()
3965 rc = -EINVAL; in CIFSSMBGetCIFSACL()
3971 rc = -ENOMEM; in CIFSSMBGetCIFSACL()
3977 return rc; in CIFSSMBGetCIFSACL()
3985 int rc = 0; in CIFSSMBSetCIFSACL() local
3991 rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB, &pSMBr); in CIFSSMBSetCIFSACL()
3992 if (rc) in CIFSSMBSetCIFSACL()
3993 return rc; in CIFSSMBSetCIFSACL()
4027 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
4031 bytes_returned, rc); in CIFSSMBSetCIFSACL()
4032 if (rc) in CIFSSMBSetCIFSACL()
4033 cifs_dbg(FYI, "Set CIFS ACL returned %d\n", rc); in CIFSSMBSetCIFSACL()
4036 if (rc == -EAGAIN) in CIFSSMBSetCIFSACL()
4039 return (rc); in CIFSSMBSetCIFSACL()
4052 int rc = 0; in SMBQueryInformation() local
4058 rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB, in SMBQueryInformation()
4060 if (rc) in SMBQueryInformation()
4061 return rc; in SMBQueryInformation()
4078 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
4080 if (rc) { in SMBQueryInformation()
4081 cifs_dbg(FYI, "Send error in QueryInfo = %d\n", rc); in SMBQueryInformation()
4101 rc = -EIO; /* bad buffer passed in */ in SMBQueryInformation()
4105 if (rc == -EAGAIN) in SMBQueryInformation()
4108 return rc; in SMBQueryInformation()
4117 int rc = 0; in CIFSSMBQFileInfo() local
4122 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFileInfo()
4124 if (rc) in CIFSSMBQFileInfo()
4125 return rc; in CIFSSMBQFileInfo()
4153 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4155 if (rc) { in CIFSSMBQFileInfo()
4156 cifs_dbg(FYI, "Send error in QFileInfo = %d\n", rc); in CIFSSMBQFileInfo()
4158 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFileInfo()
4160 if (rc) /* BB add auto retry on EOPNOTSUPP? */ in CIFSSMBQFileInfo()
4161 rc = -EIO; in CIFSSMBQFileInfo()
4163 rc = -EIO; /* bad smb */ in CIFSSMBQFileInfo()
4170 rc = -ENOMEM; in CIFSSMBQFileInfo()
4173 if (rc == -EAGAIN) in CIFSSMBQFileInfo()
4176 return rc; in CIFSSMBQFileInfo()
4188 int rc = 0; in CIFSSMBQPathInfo() local
4195 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQPathInfo()
4197 if (rc) in CIFSSMBQPathInfo()
4198 return rc; in CIFSSMBQPathInfo()
4238 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4240 if (rc) { in CIFSSMBQPathInfo()
4241 cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); in CIFSSMBQPathInfo()
4243 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQPathInfo()
4245 if (rc) /* BB add auto retry on EOPNOTSUPP? */ in CIFSSMBQPathInfo()
4246 rc = -EIO; in CIFSSMBQPathInfo()
4248 rc = -EIO; /* bad smb */ in CIFSSMBQPathInfo()
4250 rc = -EIO; /* 24 or 26 expected but we do not read in CIFSSMBQPathInfo()
4269 rc = -ENOMEM; in CIFSSMBQPathInfo()
4272 if (rc == -EAGAIN) in CIFSSMBQPathInfo()
4275 return rc; in CIFSSMBQPathInfo()
4284 int rc = 0; in CIFSSMBUnixQFileInfo() local
4289 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQFileInfo()
4291 if (rc) in CIFSSMBUnixQFileInfo()
4292 return rc; in CIFSSMBUnixQFileInfo()
4320 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4322 if (rc) { in CIFSSMBUnixQFileInfo()
4323 cifs_dbg(FYI, "Send error in UnixQFileInfo = %d\n", rc); in CIFSSMBUnixQFileInfo()
4325 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQFileInfo()
4327 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQFileInfo()
4329 rc = -EIO; /* bad smb */ in CIFSSMBUnixQFileInfo()
4340 if (rc == -EAGAIN) in CIFSSMBUnixQFileInfo()
4343 return rc; in CIFSSMBUnixQFileInfo()
4355 int rc = 0; in CIFSSMBUnixQPathInfo() local
4362 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQPathInfo()
4364 if (rc) in CIFSSMBUnixQPathInfo()
4365 return rc; in CIFSSMBUnixQPathInfo()
4402 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4404 if (rc) { in CIFSSMBUnixQPathInfo()
4405 cifs_dbg(FYI, "Send error in UnixQPathInfo = %d\n", rc); in CIFSSMBUnixQPathInfo()
4407 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQPathInfo()
4409 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQPathInfo()
4411 rc = -EIO; /* bad smb */ in CIFSSMBUnixQPathInfo()
4421 if (rc == -EAGAIN) in CIFSSMBUnixQPathInfo()
4424 return rc; in CIFSSMBUnixQPathInfo()
4438 int rc = 0; in CIFSFindFirst() local
4447 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSFindFirst()
4449 if (rc) in CIFSFindFirst()
4450 return rc; in CIFSFindFirst()
4519 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4523 if (rc) {/* BB add logic to retry regular search if Unix search in CIFSFindFirst()
4526 cifs_dbg(FYI, "Error in FindFirst = %d\n", rc); in CIFSFindFirst()
4532 if (rc == -EAGAIN) in CIFSFindFirst()
4536 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSFindFirst()
4537 if (rc == 0) { in CIFSFindFirst()
4566 return rc; in CIFSFindFirst()
4579 return rc; in CIFSFindFirst()
4590 int rc = 0; in CIFSFindNext() local
4600 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSFindNext()
4602 if (rc) in CIFSFindNext()
4603 return rc; in CIFSFindNext()
4638 rc = -EINVAL; in CIFSFindNext()
4647 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4650 if (rc) { in CIFSFindNext()
4651 if (rc == -EBADF) { in CIFSFindNext()
4654 rc = 0; /* search probably was closed at end of search*/ in CIFSFindNext()
4656 cifs_dbg(FYI, "FindNext returned = %d\n", rc); in CIFSFindNext()
4658 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSFindNext()
4660 if (rc == 0) { in CIFSFindNext()
4693 return rc; in CIFSFindNext()
4712 if (rc != 0) in CIFSFindNext()
4714 return rc; in CIFSFindNext()
4721 int rc = 0; in CIFSFindClose() local
4725 rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); in CIFSFindClose()
4729 if (rc == -EAGAIN) in CIFSFindClose()
4731 if (rc) in CIFSFindClose()
4732 return rc; in CIFSFindClose()
4736 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4738 if (rc) in CIFSFindClose()
4739 cifs_dbg(VFS, "Send error in FindClose = %d\n", rc); in CIFSFindClose()
4744 if (rc == -EAGAIN) in CIFSFindClose()
4745 rc = 0; in CIFSFindClose()
4747 return rc; in CIFSFindClose()
4755 int rc = 0; in CIFSGetSrvInodeNumber() local
4766 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSGetSrvInodeNumber()
4768 if (rc) in CIFSGetSrvInodeNumber()
4769 return rc; in CIFSGetSrvInodeNumber()
4807 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4809 if (rc) { in CIFSGetSrvInodeNumber()
4810 cifs_dbg(FYI, "error %d in QueryInternalInfo\n", rc); in CIFSGetSrvInodeNumber()
4813 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetSrvInodeNumber()
4815 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetSrvInodeNumber()
4818 rc = -EIO; /* bad smb */ in CIFSGetSrvInodeNumber()
4826 rc = -EIO; in CIFSGetSrvInodeNumber()
4836 if (rc == -EAGAIN) in CIFSGetSrvInodeNumber()
4838 return rc; in CIFSGetSrvInodeNumber()
4850 int rc = 0; in CIFSGetDFSRefer() local
4867 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, in CIFSGetDFSRefer()
4869 if (rc) in CIFSGetDFSRefer()
4870 return rc; in CIFSGetDFSRefer()
4923 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
4925 if (rc) { in CIFSGetDFSRefer()
4926 cifs_dbg(FYI, "Send error in GetDFSRefer = %d\n", rc); in CIFSGetDFSRefer()
4929 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetDFSRefer()
4932 if (rc || get_bcc(&pSMBr->hdr) < 17) { in CIFSGetDFSRefer()
4933 rc = -EIO; /* bad smb */ in CIFSGetDFSRefer()
4941 rc = parse_dfs_referrals(&pSMBr->dfs_data, in CIFSGetDFSRefer()
4950 if (rc == -EAGAIN) in CIFSGetDFSRefer()
4953 return rc; in CIFSGetDFSRefer()
4965 int rc = 0; in SMBOldQFSInfo() local
4971 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in SMBOldQFSInfo()
4973 if (rc) in SMBOldQFSInfo()
4974 return rc; in SMBOldQFSInfo()
4999 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
5001 if (rc) { in SMBOldQFSInfo()
5002 cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); in SMBOldQFSInfo()
5004 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in SMBOldQFSInfo()
5006 if (rc || get_bcc(&pSMBr->hdr) < 18) in SMBOldQFSInfo()
5007 rc = -EIO; /* bad smb */ in SMBOldQFSInfo()
5038 if (rc == -EAGAIN) in SMBOldQFSInfo()
5041 return rc; in SMBOldQFSInfo()
5052 int rc = 0; in CIFSSMBQFSInfo() local
5058 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSInfo()
5060 if (rc) in CIFSSMBQFSInfo()
5061 return rc; in CIFSSMBQFSInfo()
5086 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
5088 if (rc) { in CIFSSMBQFSInfo()
5089 cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); in CIFSSMBQFSInfo()
5091 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSInfo()
5093 if (rc || get_bcc(&pSMBr->hdr) < 24) in CIFSSMBQFSInfo()
5094 rc = -EIO; /* bad smb */ in CIFSSMBQFSInfo()
5125 if (rc == -EAGAIN) in CIFSSMBQFSInfo()
5128 return rc; in CIFSSMBQFSInfo()
5138 int rc = 0; in CIFSSMBQFSAttributeInfo() local
5144 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSAttributeInfo()
5146 if (rc) in CIFSSMBQFSAttributeInfo()
5147 return rc; in CIFSSMBQFSAttributeInfo()
5173 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5175 if (rc) { in CIFSSMBQFSAttributeInfo()
5176 cifs_dbg(VFS, "Send error in QFSAttributeInfo = %d\n", rc); in CIFSSMBQFSAttributeInfo()
5178 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSAttributeInfo()
5180 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSAttributeInfo()
5182 rc = -EIO; /* bad smb */ in CIFSSMBQFSAttributeInfo()
5195 if (rc == -EAGAIN) in CIFSSMBQFSAttributeInfo()
5198 return rc; in CIFSSMBQFSAttributeInfo()
5208 int rc = 0; in CIFSSMBQFSDeviceInfo() local
5214 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSDeviceInfo()
5216 if (rc) in CIFSSMBQFSDeviceInfo()
5217 return rc; in CIFSSMBQFSDeviceInfo()
5244 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5246 if (rc) { in CIFSSMBQFSDeviceInfo()
5247 cifs_dbg(FYI, "Send error in QFSDeviceInfo = %d\n", rc); in CIFSSMBQFSDeviceInfo()
5249 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSDeviceInfo()
5251 if (rc || get_bcc(&pSMBr->hdr) < in CIFSSMBQFSDeviceInfo()
5253 rc = -EIO; /* bad smb */ in CIFSSMBQFSDeviceInfo()
5266 if (rc == -EAGAIN) in CIFSSMBQFSDeviceInfo()
5269 return rc; in CIFSSMBQFSDeviceInfo()
5279 int rc = 0; in CIFSSMBQFSUnixInfo() local
5285 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, in CIFSSMBQFSUnixInfo()
5287 if (rc) in CIFSSMBQFSUnixInfo()
5288 return rc; in CIFSSMBQFSUnixInfo()
5314 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5316 if (rc) { in CIFSSMBQFSUnixInfo()
5317 cifs_dbg(VFS, "Send error in QFSUnixInfo = %d\n", rc); in CIFSSMBQFSUnixInfo()
5319 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSUnixInfo()
5321 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSUnixInfo()
5322 rc = -EIO; /* bad smb */ in CIFSSMBQFSUnixInfo()
5335 if (rc == -EAGAIN) in CIFSSMBQFSUnixInfo()
5339 return rc; in CIFSSMBQFSUnixInfo()
5348 int rc = 0; in CIFSSMBSetFSUnixInfo() local
5355 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, in CIFSSMBSetFSUnixInfo()
5357 if (rc) in CIFSSMBSetFSUnixInfo()
5358 return rc; in CIFSSMBSetFSUnixInfo()
5397 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5399 if (rc) { in CIFSSMBSetFSUnixInfo()
5400 cifs_dbg(VFS, "Send error in SETFSUnixInfo = %d\n", rc); in CIFSSMBSetFSUnixInfo()
5402 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBSetFSUnixInfo()
5403 if (rc) in CIFSSMBSetFSUnixInfo()
5404 rc = -EIO; /* bad smb */ in CIFSSMBSetFSUnixInfo()
5408 if (rc == -EAGAIN) in CIFSSMBSetFSUnixInfo()
5411 return rc; in CIFSSMBSetFSUnixInfo()
5424 int rc = 0; in CIFSSMBQFSPosixInfo() local
5430 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSPosixInfo()
5432 if (rc) in CIFSSMBQFSPosixInfo()
5433 return rc; in CIFSSMBQFSPosixInfo()
5459 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5461 if (rc) { in CIFSSMBQFSPosixInfo()
5462 cifs_dbg(FYI, "Send error in QFSUnixInfo = %d\n", rc); in CIFSSMBQFSPosixInfo()
5464 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSPosixInfo()
5466 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSPosixInfo()
5467 rc = -EIO; /* bad smb */ in CIFSSMBQFSPosixInfo()
5503 if (rc == -EAGAIN) in CIFSSMBQFSPosixInfo()
5506 return rc; in CIFSSMBQFSPosixInfo()
5525 int rc = 0; in CIFSSMBSetEOF() local
5533 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetEOF()
5535 if (rc) in CIFSSMBSetEOF()
5536 return rc; in CIFSSMBSetEOF()
5592 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5594 if (rc) in CIFSSMBSetEOF()
5595 cifs_dbg(FYI, "SetPathInfo (file size) returned %d\n", rc); in CIFSSMBSetEOF()
5599 if (rc == -EAGAIN) in CIFSSMBSetEOF()
5602 return rc; in CIFSSMBSetEOF()
5611 int rc = 0; in CIFSSMBSetFileSize() local
5616 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileSize()
5618 if (rc) in CIFSSMBSetFileSize()
5619 return rc; in CIFSSMBSetFileSize()
5670 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5672 if (rc) { in CIFSSMBSetFileSize()
5674 rc); in CIFSSMBSetFileSize()
5680 return rc; in CIFSSMBSetFileSize()
5695 int rc = 0; in CIFSSMBSetFileInfo() local
5699 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileInfo()
5701 if (rc) in CIFSSMBSetFileInfo()
5702 return rc; in CIFSSMBSetFileInfo()
5742 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5744 if (rc) in CIFSSMBSetFileInfo()
5746 rc); in CIFSSMBSetFileInfo()
5751 return rc; in CIFSSMBSetFileInfo()
5760 int rc = 0; in CIFSSMBSetFileDisposition() local
5764 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileDisposition()
5766 if (rc) in CIFSSMBSetFileDisposition()
5767 return rc; in CIFSSMBSetFileDisposition()
5803 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5805 if (rc) in CIFSSMBSetFileDisposition()
5806 cifs_dbg(FYI, "Send error in SetFileDisposition = %d\n", rc); in CIFSSMBSetFileDisposition()
5808 return rc; in CIFSSMBSetFileDisposition()
5820 int rc; in CIFSSMBSetPathInfoFB() local
5831 rc = CIFS_open(xid, &oparms, &oplock, NULL); in CIFSSMBSetPathInfoFB()
5832 if (rc) in CIFSSMBSetPathInfoFB()
5835 rc = CIFSSMBSetFileInfo(xid, tcon, data, fid.netfid, current->tgid); in CIFSSMBSetPathInfoFB()
5839 return rc; in CIFSSMBSetPathInfoFB()
5851 int rc = 0; in CIFSSMBSetPathInfo() local
5860 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetPathInfo()
5862 if (rc) in CIFSSMBSetPathInfo()
5863 return rc; in CIFSSMBSetPathInfo()
5908 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5910 if (rc) in CIFSSMBSetPathInfo()
5911 cifs_dbg(FYI, "SetPathInfo (times) returned %d\n", rc); in CIFSSMBSetPathInfo()
5915 if (rc == -EAGAIN) in CIFSSMBSetPathInfo()
5918 if (rc == -EOPNOTSUPP) in CIFSSMBSetPathInfo()
5922 return rc; in CIFSSMBSetPathInfo()
5936 int rc = 0;
5943 rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB,
5945 if (rc)
5946 return rc;
5961 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
5963 if (rc)
5964 cifs_dbg(FYI, "Error in LegacySetAttr = %d\n", rc);
5968 if (rc == -EAGAIN)
5971 return rc;
6029 int rc = 0; in CIFSSMBUnixSetFileInfo() local
6033 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBUnixSetFileInfo()
6035 if (rc) in CIFSSMBUnixSetFileInfo()
6036 return rc; in CIFSSMBUnixSetFileInfo()
6076 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
6078 if (rc) in CIFSSMBUnixSetFileInfo()
6080 rc); in CIFSSMBUnixSetFileInfo()
6085 return rc; in CIFSSMBUnixSetFileInfo()
6097 int rc = 0; in CIFSSMBUnixSetPathInfo() local
6104 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixSetPathInfo()
6106 if (rc) in CIFSSMBUnixSetPathInfo()
6107 return rc; in CIFSSMBUnixSetPathInfo()
6153 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
6155 if (rc) in CIFSSMBUnixSetPathInfo()
6156 cifs_dbg(FYI, "SetPathInfo (perms) returned %d\n", rc); in CIFSSMBUnixSetPathInfo()
6159 if (rc == -EAGAIN) in CIFSSMBUnixSetPathInfo()
6161 return rc; in CIFSSMBUnixSetPathInfo()
6185 int rc = 0; in CIFSSMBQAllEAs() local
6197 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQAllEAs()
6199 if (rc) in CIFSSMBQAllEAs()
6200 return rc; in CIFSSMBQAllEAs()
6237 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6239 if (rc) { in CIFSSMBQAllEAs()
6240 cifs_dbg(FYI, "Send error in QueryAllEAs = %d\n", rc); in CIFSSMBQAllEAs()
6249 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQAllEAs()
6250 if (rc || get_bcc(&pSMBr->hdr) < 4) { in CIFSSMBQAllEAs()
6251 rc = -EIO; /* bad smb */ in CIFSSMBQAllEAs()
6273 rc = -ENODATA; in CIFSSMBQAllEAs()
6281 rc = -EIO; in CIFSSMBQAllEAs()
6298 rc = -EIO; in CIFSSMBQAllEAs()
6307 rc = -EIO; in CIFSSMBQAllEAs()
6315 rc = value_len; in CIFSSMBQAllEAs()
6319 rc = -ERANGE; in CIFSSMBQAllEAs()
6327 rc += (5 + 1 + name_len); in CIFSSMBQAllEAs()
6328 if (rc < (int) buf_size) { in CIFSSMBQAllEAs()
6340 rc = -ERANGE; in CIFSSMBQAllEAs()
6350 rc = -ENODATA; in CIFSSMBQAllEAs()
6354 if (rc == -EAGAIN) in CIFSSMBQAllEAs()
6357 return (ssize_t)rc; in CIFSSMBQAllEAs()
6370 int rc = 0; in CIFSSMBSetEA() local
6377 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetEA()
6379 if (rc) in CIFSSMBSetEA()
6380 return rc; in CIFSSMBSetEA()
6450 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()
6452 if (rc) in CIFSSMBSetEA()
6453 cifs_dbg(FYI, "SetPathInfo (EA) returned %d\n", rc); in CIFSSMBSetEA()
6457 if (rc == -EAGAIN) in CIFSSMBSetEA()
6460 return rc; in CIFSSMBSetEA()