• Home
  • Raw
  • Download

Lines Matching refs:rc

102 	int rc;  in cifs_reconnect_tcon()  local
141 rc = wait_event_interruptible_timeout(server->response_q, in cifs_reconnect_tcon()
144 if (rc < 0) { in cifs_reconnect_tcon()
186 rc = -EHOSTDOWN; in cifs_reconnect_tcon()
191 rc = cifs_negotiate_protocol(0, ses); in cifs_reconnect_tcon()
192 if (rc == 0 && ses->need_reconnect) in cifs_reconnect_tcon()
193 rc = cifs_setup_session(0, ses, nls_codepage); in cifs_reconnect_tcon()
196 if (rc || !tcon->need_reconnect) { in cifs_reconnect_tcon()
202 rc = cifs_tree_connect(0, tcon, nls_codepage); in cifs_reconnect_tcon()
204 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); in cifs_reconnect_tcon()
206 if (rc) { in cifs_reconnect_tcon()
207 pr_warn_once("reconnect tcon failed rc = %d\n", rc); in cifs_reconnect_tcon()
235 rc = -EAGAIN; in cifs_reconnect_tcon()
239 return rc; in cifs_reconnect_tcon()
249 int rc; in small_smb_init() local
251 rc = cifs_reconnect_tcon(tcon, smb_command); in small_smb_init()
252 if (rc) in small_smb_init()
253 return rc; in small_smb_init()
274 int rc; in small_smb_init_no_tc() local
277 rc = small_smb_init(smb_command, wct, NULL, request_buf); in small_smb_init_no_tc()
278 if (rc) in small_smb_init_no_tc()
279 return rc; in small_smb_init_no_tc()
293 return rc; in small_smb_init_no_tc()
327 int rc; in smb_init() local
329 rc = cifs_reconnect_tcon(tcon, smb_command); in smb_init()
330 if (rc) in smb_init()
331 return rc; in smb_init()
381 int rc = 0; in decode_ext_sec_blob() local
406 rc = decode_negTokenInit( in decode_ext_sec_blob()
408 if (rc != 1) in decode_ext_sec_blob()
483 int rc = 0; in CIFSSMBNegotiate() local
494 rc = smb_init(SMB_COM_NEGOTIATE, 0, NULL /* no tcon yet */ , in CIFSSMBNegotiate()
496 if (rc) in CIFSSMBNegotiate()
497 return rc; in CIFSSMBNegotiate()
521 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSSMBNegotiate()
523 if (rc != 0) in CIFSSMBNegotiate()
533 rc = -EOPNOTSUPP; in CIFSSMBNegotiate()
537 rc = -EOPNOTSUPP; in CIFSSMBNegotiate()
568 rc = decode_ext_sec_blob(ses, pSMBr); in CIFSSMBNegotiate()
570 rc = -EIO; /* no crypt key only if plain text pwd */ in CIFSSMBNegotiate()
576 if (!rc) in CIFSSMBNegotiate()
577 rc = cifs_enable_signing(server, ses->sign); in CIFSSMBNegotiate()
581 cifs_dbg(FYI, "negprot rc %d\n", rc); in CIFSSMBNegotiate()
582 return rc; in CIFSSMBNegotiate()
589 int rc = 0; in CIFSSMBTDis() local
606 rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon, in CIFSSMBTDis()
608 if (rc) in CIFSSMBTDis()
609 return rc; in CIFSSMBTDis()
611 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)smb_buffer, 0); in CIFSSMBTDis()
613 if (rc) in CIFSSMBTDis()
614 cifs_dbg(FYI, "Tree disconnect failed %d\n", rc); in CIFSSMBTDis()
618 if (rc == -EAGAIN) in CIFSSMBTDis()
619 rc = 0; in CIFSSMBTDis()
621 return rc; in CIFSSMBTDis()
645 int rc = 0; in CIFSSMBEcho() local
652 rc = small_smb_init(SMB_COM_ECHO, 0, NULL, (void **)&smb); in CIFSSMBEcho()
653 if (rc) in CIFSSMBEcho()
654 return rc; in CIFSSMBEcho()
672 rc = cifs_call_async(server, &rqst, NULL, cifs_echo_callback, NULL, in CIFSSMBEcho()
674 if (rc) in CIFSSMBEcho()
675 cifs_dbg(FYI, "Echo request failed: %d\n", rc); in CIFSSMBEcho()
679 return rc; in CIFSSMBEcho()
686 int rc = 0; in CIFSSMBLogoff() local
702 rc = small_smb_init(SMB_COM_LOGOFF_ANDX, 2, NULL, (void **)&pSMB); in CIFSSMBLogoff()
703 if (rc) { in CIFSSMBLogoff()
705 return rc; in CIFSSMBLogoff()
716 rc = SendReceiveNoRsp(xid, ses, (char *) pSMB, 0); in CIFSSMBLogoff()
724 if (rc == -EAGAIN) in CIFSSMBLogoff()
725 rc = 0; in CIFSSMBLogoff()
726 return rc; in CIFSSMBLogoff()
738 int rc = 0; in CIFSPOSIXDelFile() local
744 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSPOSIXDelFile()
746 if (rc) in CIFSPOSIXDelFile()
747 return rc; in CIFSPOSIXDelFile()
792 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXDelFile()
794 if (rc) in CIFSPOSIXDelFile()
795 cifs_dbg(FYI, "Posix delete returned %d\n", rc); in CIFSPOSIXDelFile()
800 if (rc == -EAGAIN) in CIFSPOSIXDelFile()
803 return rc; in CIFSPOSIXDelFile()
812 int rc = 0; in CIFSSMBDelFile() local
818 rc = smb_init(SMB_COM_DELETE, 1, tcon, (void **) &pSMB, in CIFSSMBDelFile()
820 if (rc) in CIFSSMBDelFile()
821 return rc; in CIFSSMBDelFile()
837 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBDelFile()
840 if (rc) in CIFSSMBDelFile()
841 cifs_dbg(FYI, "Error in RMFile = %d\n", rc); in CIFSSMBDelFile()
844 if (rc == -EAGAIN) in CIFSSMBDelFile()
847 return rc; in CIFSSMBDelFile()
856 int rc = 0; in CIFSSMBRmDir() local
863 rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB, in CIFSSMBRmDir()
865 if (rc) in CIFSSMBRmDir()
866 return rc; in CIFSSMBRmDir()
881 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRmDir()
884 if (rc) in CIFSSMBRmDir()
885 cifs_dbg(FYI, "Error in RMDir = %d\n", rc); in CIFSSMBRmDir()
888 if (rc == -EAGAIN) in CIFSSMBRmDir()
890 return rc; in CIFSSMBRmDir()
898 int rc = 0; in CIFSSMBMkDir() local
907 rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB, in CIFSSMBMkDir()
909 if (rc) in CIFSSMBMkDir()
910 return rc; in CIFSSMBMkDir()
925 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBMkDir()
928 if (rc) in CIFSSMBMkDir()
929 cifs_dbg(FYI, "Error in Mkdir = %d\n", rc); in CIFSSMBMkDir()
932 if (rc == -EAGAIN) in CIFSSMBMkDir()
934 return rc; in CIFSSMBMkDir()
947 int rc = 0; in CIFSPOSIXCreate() local
955 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSPOSIXCreate()
957 if (rc) in CIFSPOSIXCreate()
958 return rc; in CIFSPOSIXCreate()
1003 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSPOSIXCreate()
1005 if (rc) { in CIFSPOSIXCreate()
1006 cifs_dbg(FYI, "Posix create returned %d\n", rc); in CIFSPOSIXCreate()
1011 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSPOSIXCreate()
1013 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) { in CIFSPOSIXCreate()
1014 rc = -EIO; /* bad smb */ in CIFSPOSIXCreate()
1053 if (rc == -EAGAIN) in CIFSPOSIXCreate()
1056 return rc; in CIFSPOSIXCreate()
1110 int rc; in SMBLegacyOpen() local
1118 rc = smb_init(SMB_COM_OPEN_ANDX, 15, tcon, (void **) &pSMB, in SMBLegacyOpen()
1120 if (rc) in SMBLegacyOpen()
1121 return rc; in SMBLegacyOpen()
1167 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBLegacyOpen()
1170 if (rc) { in SMBLegacyOpen()
1171 cifs_dbg(FYI, "Error in Open = %d\n", rc); in SMBLegacyOpen()
1202 if (rc == -EAGAIN) in SMBLegacyOpen()
1204 return rc; in SMBLegacyOpen()
1211 int rc; in CIFS_open() local
1227 rc = smb_init(SMB_COM_NT_CREATE_ANDX, 24, tcon, (void **)&req, in CIFS_open()
1229 if (rc) in CIFS_open()
1230 return rc; in CIFS_open()
1291 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *)req, in CIFS_open()
1294 if (rc) { in CIFS_open()
1295 cifs_dbg(FYI, "Error in Open = %d\n", rc); in CIFS_open()
1297 if (rc == -EAGAIN) in CIFS_open()
1299 return rc; in CIFS_open()
1324 return rc; in CIFS_open()
1528 int rc = 0; in cifs_readv_callback() local
1530 rc = cifs_verify_signature(&rqst, server, in cifs_readv_callback()
1532 if (rc) in cifs_readv_callback()
1534 rc); in cifs_readv_callback()
1563 int rc; in cifs_async_readv() local
1583 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **)&smb); in cifs_async_readv()
1584 if (rc) in cifs_async_readv()
1585 return rc; in cifs_async_readv()
1614 rc = cifs_call_async(tcon->ses->server, &rqst, cifs_readv_receive, in cifs_async_readv()
1617 if (rc == 0) in cifs_async_readv()
1623 return rc; in cifs_async_readv()
1630 int rc = -EACCES; in CIFSSMBRead() local
1656 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **) &pSMB); in CIFSSMBRead()
1657 if (rc) in CIFSSMBRead()
1658 return rc; in CIFSSMBRead()
1687 rc = SendReceive2(xid, tcon->ses, iov, 1, &resp_buf_type, in CIFSSMBRead()
1692 if (rc) { in CIFSSMBRead()
1693 cifs_dbg(VFS, "Send error in read = %d\n", rc); in CIFSSMBRead()
1705 rc = -EIO; in CIFSSMBRead()
1732 return rc; in CIFSSMBRead()
1740 int rc = -EACCES; in CIFSSMBWrite() local
1768 rc = smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB, in CIFSSMBWrite()
1770 if (rc) in CIFSSMBWrite()
1771 return rc; in CIFSSMBWrite()
1830 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBWrite()
1833 if (rc) { in CIFSSMBWrite()
1834 cifs_dbg(FYI, "Send error in write = %d\n", rc); in CIFSSMBWrite()
1854 return rc; in CIFSSMBWrite()
1883 int i, rc = 0; in cifs_writev_requeue() local
1899 rc = -ENOTSUPP; in cifs_writev_requeue()
1912 rc = -ENOMEM; in cifs_writev_requeue()
1929 rc = cifs_get_writable_file(CIFS_I(inode), FIND_WR_ANY, in cifs_writev_requeue()
1933 rc); in cifs_writev_requeue()
1934 if (!is_retryable_error(rc)) in cifs_writev_requeue()
1935 rc = -EBADF; in cifs_writev_requeue()
1938 rc = server->ops->async_writev(wdata2, in cifs_writev_requeue()
1944 if (rc != 0 && !is_retryable_error(rc)) { in cifs_writev_requeue()
1952 if (rc) { in cifs_writev_requeue()
1953 if (is_retryable_error(rc)) in cifs_writev_requeue()
1970 if (rc != 0 && !is_retryable_error(rc)) in cifs_writev_requeue()
1971 mapping_set_error(inode->i_mapping, rc); in cifs_writev_requeue()
2089 int rc = -EACCES; in cifs_async_writev() local
2106 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **)&smb); in cifs_async_writev()
2107 if (rc) in cifs_async_writev()
2158 rc = cifs_call_async(tcon->ses->server, &rqst, NULL, in cifs_async_writev()
2161 if (rc == 0) in cifs_async_writev()
2168 return rc; in cifs_async_writev()
2175 int rc; in CIFSSMBWrite2() local
2200 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB); in CIFSSMBWrite2()
2201 if (rc) in CIFSSMBWrite2()
2202 return rc; in CIFSSMBWrite2()
2244 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, 0, in CIFSSMBWrite2()
2248 if (rc) { in CIFSSMBWrite2()
2249 cifs_dbg(FYI, "Send error Write2 = %d\n", rc); in CIFSSMBWrite2()
2252 rc = -EIO; in CIFSSMBWrite2()
2273 return rc; in CIFSSMBWrite2()
2280 int rc = 0; in cifs_lockv() local
2290 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); in cifs_lockv()
2291 if (rc) in cifs_lockv()
2292 return rc; in cifs_lockv()
2312 rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, in cifs_lockv()
2315 if (rc) in cifs_lockv()
2316 cifs_dbg(FYI, "Send error in cifs_lockv = %d\n", rc); in cifs_lockv()
2318 return rc; in cifs_lockv()
2328 int rc = 0; in CIFSSMBLock() local
2337 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); in CIFSSMBLock()
2339 if (rc) in CIFSSMBLock()
2340 return rc; in CIFSSMBLock()
2376 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, in CIFSSMBLock()
2379 rc = SendReceiveNoRsp(xid, tcon->ses, (char *)pSMB, flags); in CIFSSMBLock()
2382 if (rc) in CIFSSMBLock()
2383 cifs_dbg(FYI, "Send error in Lock = %d\n", rc); in CIFSSMBLock()
2387 return rc; in CIFSSMBLock()
2400 int rc = 0; in CIFSSMBPosixLock() local
2410 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBPosixLock()
2412 if (rc) in CIFSSMBPosixLock()
2413 return rc; in CIFSSMBPosixLock()
2463 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, in CIFSSMBPosixLock()
2468 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, in CIFSSMBPosixLock()
2474 if (rc) { in CIFSSMBPosixLock()
2475 cifs_dbg(FYI, "Send error in Posix Lock = %d\n", rc); in CIFSSMBPosixLock()
2480 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBPosixLock()
2482 if (rc || get_bcc(&pSMBr->hdr) < sizeof(*parm_data)) { in CIFSSMBPosixLock()
2483 rc = -EIO; /* bad smb */ in CIFSSMBPosixLock()
2489 rc = -EIO; in CIFSSMBPosixLock()
2517 return rc; in CIFSSMBPosixLock()
2524 int rc = 0; in CIFSSMBClose() local
2529 rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB); in CIFSSMBClose()
2530 if (rc == -EAGAIN) in CIFSSMBClose()
2532 if (rc) in CIFSSMBClose()
2533 return rc; in CIFSSMBClose()
2538 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBClose()
2541 if (rc) { in CIFSSMBClose()
2542 if (rc != -EINTR) { in CIFSSMBClose()
2544 cifs_dbg(VFS, "Send error in Close = %d\n", rc); in CIFSSMBClose()
2549 if (rc == -EAGAIN) in CIFSSMBClose()
2550 rc = 0; in CIFSSMBClose()
2552 return rc; in CIFSSMBClose()
2558 int rc = 0; in CIFSSMBFlush() local
2562 rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB); in CIFSSMBFlush()
2563 if (rc) in CIFSSMBFlush()
2564 return rc; in CIFSSMBFlush()
2568 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBFlush()
2571 if (rc) in CIFSSMBFlush()
2572 cifs_dbg(VFS, "Send error in Flush = %d\n", rc); in CIFSSMBFlush()
2574 return rc; in CIFSSMBFlush()
2582 int rc = 0; in CIFSSMBRename() local
2592 rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB, in CIFSSMBRename()
2594 if (rc) in CIFSSMBRename()
2595 return rc; in CIFSSMBRename()
2628 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRename()
2631 if (rc) in CIFSSMBRename()
2632 cifs_dbg(FYI, "Send error in rename = %d\n", rc); in CIFSSMBRename()
2636 if (rc == -EAGAIN) in CIFSSMBRename()
2639 return rc; in CIFSSMBRename()
2651 int rc = 0; in CIFSSMBRenameOpenFile() local
2657 rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB, in CIFSSMBRenameOpenFile()
2659 if (rc) in CIFSSMBRenameOpenFile()
2660 return rc; in CIFSSMBRenameOpenFile()
2710 rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBRenameOpenFile()
2713 if (rc) in CIFSSMBRenameOpenFile()
2715 rc); in CIFSSMBRenameOpenFile()
2722 return rc; in CIFSSMBRenameOpenFile()
2730 int rc = 0; in CIFSSMBCopy() local
2739 rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB, in CIFSSMBCopy()
2741 if (rc) in CIFSSMBCopy()
2742 return rc; in CIFSSMBCopy()
2774 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBCopy()
2776 if (rc) { in CIFSSMBCopy()
2778 rc, le16_to_cpu(pSMBr->CopyCount)); in CIFSSMBCopy()
2782 if (rc == -EAGAIN) in CIFSSMBCopy()
2785 return rc; in CIFSSMBCopy()
2798 int rc = 0; in CIFSUnixCreateSymLink() local
2804 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSUnixCreateSymLink()
2806 if (rc) in CIFSUnixCreateSymLink()
2807 return rc; in CIFSUnixCreateSymLink()
2860 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateSymLink()
2863 if (rc) in CIFSUnixCreateSymLink()
2865 rc); in CIFSUnixCreateSymLink()
2869 if (rc == -EAGAIN) in CIFSUnixCreateSymLink()
2872 return rc; in CIFSUnixCreateSymLink()
2885 int rc = 0; in CIFSUnixCreateHardLink() local
2891 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSUnixCreateHardLink()
2893 if (rc) in CIFSUnixCreateHardLink()
2894 return rc; in CIFSUnixCreateHardLink()
2944 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSUnixCreateHardLink()
2947 if (rc) in CIFSUnixCreateHardLink()
2949 rc); in CIFSUnixCreateHardLink()
2952 if (rc == -EAGAIN) in CIFSUnixCreateHardLink()
2955 return rc; in CIFSUnixCreateHardLink()
2963 int rc = 0; in CIFSCreateHardLink() local
2974 rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB, in CIFSCreateHardLink()
2976 if (rc) in CIFSCreateHardLink()
2977 return rc; in CIFSCreateHardLink()
3014 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSCreateHardLink()
3017 if (rc) in CIFSCreateHardLink()
3018 cifs_dbg(FYI, "Send error in hard link (NT rename) = %d\n", rc); in CIFSCreateHardLink()
3021 if (rc == -EAGAIN) in CIFSCreateHardLink()
3024 return rc; in CIFSCreateHardLink()
3035 int rc = 0; in CIFSSMBUnixQuerySymLink() local
3044 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQuerySymLink()
3046 if (rc) in CIFSSMBUnixQuerySymLink()
3047 return rc; in CIFSSMBUnixQuerySymLink()
3084 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQuerySymLink()
3086 if (rc) { in CIFSSMBUnixQuerySymLink()
3087 cifs_dbg(FYI, "Send error in QuerySymLinkInfo = %d\n", rc); in CIFSSMBUnixQuerySymLink()
3091 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQuerySymLink()
3093 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBUnixQuerySymLink()
3094 rc = -EIO; in CIFSSMBUnixQuerySymLink()
3111 rc = -ENOMEM; in CIFSSMBUnixQuerySymLink()
3115 if (rc == -EAGAIN) in CIFSSMBUnixQuerySymLink()
3117 return rc; in CIFSSMBUnixQuerySymLink()
3135 int rc = 0; in CIFSSMBQuerySymLink() local
3148 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, in CIFSSMBQuerySymLink()
3150 if (rc) in CIFSSMBQuerySymLink()
3151 return rc; in CIFSSMBQuerySymLink()
3172 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQuerySymLink()
3174 if (rc) { in CIFSSMBQuerySymLink()
3175 cifs_dbg(FYI, "Send error in QueryReparseLinkInfo = %d\n", rc); in CIFSSMBQuerySymLink()
3183 rc = -EIO; /* bad smb */ in CIFSSMBQuerySymLink()
3187 rc = -EIO; in CIFSSMBQuerySymLink()
3195 rc = -EIO; in CIFSSMBQuerySymLink()
3205 rc = -EOPNOTSUPP; in CIFSSMBQuerySymLink()
3212 rc = -EIO; in CIFSSMBQuerySymLink()
3220 rc = -EOPNOTSUPP; in CIFSSMBQuerySymLink()
3230 rc = -EIO; in CIFSSMBQuerySymLink()
3242 rc = -ENOMEM; in CIFSSMBQuerySymLink()
3250 return rc; in CIFSSMBQuerySymLink()
3257 int rc = 0; in CIFSSMB_set_compression() local
3263 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB, in CIFSSMB_set_compression()
3265 if (rc) in CIFSSMB_set_compression()
3266 return rc; in CIFSSMB_set_compression()
3292 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMB_set_compression()
3294 if (rc) in CIFSSMB_set_compression()
3295 cifs_dbg(FYI, "Send error in SetCompression = %d\n", rc); in CIFSSMB_set_compression()
3303 return rc; in CIFSSMB_set_compression()
3404 __u16 rc = 0; in ACL_to_cifs_posix() local
3435 if (rc == 0) { in ACL_to_cifs_posix()
3436 rc = (__u16)(count * sizeof(struct cifs_posix_ace)); in ACL_to_cifs_posix()
3437 rc += sizeof(struct cifs_posix_acl); in ACL_to_cifs_posix()
3440 return rc; in ACL_to_cifs_posix()
3452 int rc = 0; in CIFSSMBGetPosixACL() local
3460 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBGetPosixACL()
3462 if (rc) in CIFSSMBGetPosixACL()
3463 return rc; in CIFSSMBGetPosixACL()
3504 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBGetPosixACL()
3507 if (rc) { in CIFSSMBGetPosixACL()
3508 cifs_dbg(FYI, "Send error in Query POSIX ACL = %d\n", rc); in CIFSSMBGetPosixACL()
3512 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBGetPosixACL()
3514 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBGetPosixACL()
3515 rc = -EIO; /* bad smb */ in CIFSSMBGetPosixACL()
3519 rc = cifs_copy_posix_acl(acl_inf, in CIFSSMBGetPosixACL()
3525 if (rc == -EAGAIN) in CIFSSMBGetPosixACL()
3527 return rc; in CIFSSMBGetPosixACL()
3541 int rc = 0; in CIFSSMBSetPosixACL() local
3547 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetPosixACL()
3549 if (rc) in CIFSSMBSetPosixACL()
3550 return rc; in CIFSSMBSetPosixACL()
3579 rc = -EOPNOTSUPP; in CIFSSMBSetPosixACL()
3595 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPosixACL()
3597 if (rc) in CIFSSMBSetPosixACL()
3598 cifs_dbg(FYI, "Set POSIX ACL returned %d\n", rc); in CIFSSMBSetPosixACL()
3602 if (rc == -EAGAIN) in CIFSSMBSetPosixACL()
3604 return rc; in CIFSSMBSetPosixACL()
3612 int rc = 0; in CIFSGetExtAttr() local
3623 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSGetExtAttr()
3625 if (rc) in CIFSGetExtAttr()
3626 return rc; in CIFSGetExtAttr()
3654 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetExtAttr()
3656 if (rc) { in CIFSGetExtAttr()
3657 cifs_dbg(FYI, "error %d in GetExtAttr\n", rc); in CIFSGetExtAttr()
3660 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetExtAttr()
3662 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetExtAttr()
3665 rc = -EIO; /* bad smb */ in CIFSGetExtAttr()
3673 rc = -EIO; in CIFSGetExtAttr()
3684 if (rc == -EAGAIN) in CIFSGetExtAttr()
3686 return rc; in CIFSGetExtAttr()
3704 int rc; in smb_init_nttransact() local
3708 rc = small_smb_init(SMB_COM_NT_TRANSACT, 19 + setup_count, tcon, in smb_init_nttransact()
3710 if (rc) in smb_init_nttransact()
3711 return rc; in smb_init_nttransact()
3786 int rc = 0; in CIFSSMBGetCIFSACL() local
3797 rc = smb_init_nttransact(NT_TRANSACT_QUERY_SECURITY_DESC, 0, in CIFSSMBGetCIFSACL()
3799 if (rc) in CIFSSMBGetCIFSACL()
3800 return rc; in CIFSSMBGetCIFSACL()
3813 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, in CIFSSMBGetCIFSACL()
3817 if (rc) { in CIFSSMBGetCIFSACL()
3818 cifs_dbg(FYI, "Send error in QuerySecDesc = %d\n", rc); in CIFSSMBGetCIFSACL()
3827 rc = validate_ntransact(rsp_iov.iov_base, (char **)&parm, in CIFSSMBGetCIFSACL()
3829 if (rc) in CIFSSMBGetCIFSACL()
3837 rc = -EIO; /* bad smb */ in CIFSSMBGetCIFSACL()
3857 rc = -EINVAL; in CIFSSMBGetCIFSACL()
3863 rc = -ENOMEM; in CIFSSMBGetCIFSACL()
3869 return rc; in CIFSSMBGetCIFSACL()
3877 int rc = 0; in CIFSSMBSetCIFSACL() local
3883 rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB, &pSMBr); in CIFSSMBSetCIFSACL()
3884 if (rc) in CIFSSMBSetCIFSACL()
3885 return rc; in CIFSSMBSetCIFSACL()
3919 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetCIFSACL()
3923 bytes_returned, rc); in CIFSSMBSetCIFSACL()
3924 if (rc) in CIFSSMBSetCIFSACL()
3925 cifs_dbg(FYI, "Set CIFS ACL returned %d\n", rc); in CIFSSMBSetCIFSACL()
3928 if (rc == -EAGAIN) in CIFSSMBSetCIFSACL()
3931 return (rc); in CIFSSMBSetCIFSACL()
3944 int rc = 0; in SMBQueryInformation() local
3950 rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB, in SMBQueryInformation()
3952 if (rc) in SMBQueryInformation()
3953 return rc; in SMBQueryInformation()
3970 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBQueryInformation()
3972 if (rc) { in SMBQueryInformation()
3973 cifs_dbg(FYI, "Send error in QueryInfo = %d\n", rc); in SMBQueryInformation()
3993 rc = -EIO; /* bad buffer passed in */ in SMBQueryInformation()
3997 if (rc == -EAGAIN) in SMBQueryInformation()
4000 return rc; in SMBQueryInformation()
4009 int rc = 0; in CIFSSMBQFileInfo() local
4014 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFileInfo()
4016 if (rc) in CIFSSMBQFileInfo()
4017 return rc; in CIFSSMBQFileInfo()
4045 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFileInfo()
4047 if (rc) { in CIFSSMBQFileInfo()
4048 cifs_dbg(FYI, "Send error in QFileInfo = %d\n", rc); in CIFSSMBQFileInfo()
4050 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFileInfo()
4052 if (rc) /* BB add auto retry on EOPNOTSUPP? */ in CIFSSMBQFileInfo()
4053 rc = -EIO; in CIFSSMBQFileInfo()
4055 rc = -EIO; /* bad smb */ in CIFSSMBQFileInfo()
4062 rc = -ENOMEM; in CIFSSMBQFileInfo()
4065 if (rc == -EAGAIN) in CIFSSMBQFileInfo()
4068 return rc; in CIFSSMBQFileInfo()
4080 int rc = 0; in CIFSSMBQPathInfo() local
4087 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQPathInfo()
4089 if (rc) in CIFSSMBQPathInfo()
4090 return rc; in CIFSSMBQPathInfo()
4130 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQPathInfo()
4132 if (rc) { in CIFSSMBQPathInfo()
4133 cifs_dbg(FYI, "Send error in QPathInfo = %d\n", rc); in CIFSSMBQPathInfo()
4135 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQPathInfo()
4137 if (rc) /* BB add auto retry on EOPNOTSUPP? */ in CIFSSMBQPathInfo()
4138 rc = -EIO; in CIFSSMBQPathInfo()
4140 rc = -EIO; /* bad smb */ in CIFSSMBQPathInfo()
4142 rc = -EIO; /* 24 or 26 expected but we do not read in CIFSSMBQPathInfo()
4161 rc = -ENOMEM; in CIFSSMBQPathInfo()
4164 if (rc == -EAGAIN) in CIFSSMBQPathInfo()
4167 return rc; in CIFSSMBQPathInfo()
4176 int rc = 0; in CIFSSMBUnixQFileInfo() local
4181 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQFileInfo()
4183 if (rc) in CIFSSMBUnixQFileInfo()
4184 return rc; in CIFSSMBUnixQFileInfo()
4212 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQFileInfo()
4214 if (rc) { in CIFSSMBUnixQFileInfo()
4215 cifs_dbg(FYI, "Send error in UnixQFileInfo = %d\n", rc); in CIFSSMBUnixQFileInfo()
4217 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQFileInfo()
4219 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQFileInfo()
4221 rc = -EIO; /* bad smb */ in CIFSSMBUnixQFileInfo()
4232 if (rc == -EAGAIN) in CIFSSMBUnixQFileInfo()
4235 return rc; in CIFSSMBUnixQFileInfo()
4247 int rc = 0; in CIFSSMBUnixQPathInfo() local
4254 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixQPathInfo()
4256 if (rc) in CIFSSMBUnixQPathInfo()
4257 return rc; in CIFSSMBUnixQPathInfo()
4294 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixQPathInfo()
4296 if (rc) { in CIFSSMBUnixQPathInfo()
4297 cifs_dbg(FYI, "Send error in UnixQPathInfo = %d\n", rc); in CIFSSMBUnixQPathInfo()
4299 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBUnixQPathInfo()
4301 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQPathInfo()
4303 rc = -EIO; /* bad smb */ in CIFSSMBUnixQPathInfo()
4313 if (rc == -EAGAIN) in CIFSSMBUnixQPathInfo()
4316 return rc; in CIFSSMBUnixQPathInfo()
4330 int rc = 0; in CIFSFindFirst() local
4339 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSFindFirst()
4341 if (rc) in CIFSFindFirst()
4342 return rc; in CIFSFindFirst()
4411 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindFirst()
4415 if (rc) {/* BB add logic to retry regular search if Unix search in CIFSFindFirst()
4418 cifs_dbg(FYI, "Error in FindFirst = %d\n", rc); in CIFSFindFirst()
4424 if (rc == -EAGAIN) in CIFSFindFirst()
4428 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSFindFirst()
4429 if (rc == 0) { in CIFSFindFirst()
4458 return rc; in CIFSFindFirst()
4471 return rc; in CIFSFindFirst()
4482 int rc = 0; in CIFSFindNext() local
4492 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSFindNext()
4494 if (rc) in CIFSFindNext()
4495 return rc; in CIFSFindNext()
4530 rc = -EINVAL; in CIFSFindNext()
4539 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSFindNext()
4542 if (rc) { in CIFSFindNext()
4543 if (rc == -EBADF) { in CIFSFindNext()
4546 rc = 0; /* search probably was closed at end of search*/ in CIFSFindNext()
4548 cifs_dbg(FYI, "FindNext returned = %d\n", rc); in CIFSFindNext()
4550 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSFindNext()
4552 if (rc == 0) { in CIFSFindNext()
4585 return rc; in CIFSFindNext()
4604 if (rc != 0) in CIFSFindNext()
4606 return rc; in CIFSFindNext()
4613 int rc = 0; in CIFSFindClose() local
4617 rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); in CIFSFindClose()
4621 if (rc == -EAGAIN) in CIFSFindClose()
4623 if (rc) in CIFSFindClose()
4624 return rc; in CIFSFindClose()
4628 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSFindClose()
4630 if (rc) in CIFSFindClose()
4631 cifs_dbg(VFS, "Send error in FindClose = %d\n", rc); in CIFSFindClose()
4636 if (rc == -EAGAIN) in CIFSFindClose()
4637 rc = 0; in CIFSFindClose()
4639 return rc; in CIFSFindClose()
4647 int rc = 0; in CIFSGetSrvInodeNumber() local
4658 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSGetSrvInodeNumber()
4660 if (rc) in CIFSGetSrvInodeNumber()
4661 return rc; in CIFSGetSrvInodeNumber()
4699 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSGetSrvInodeNumber()
4701 if (rc) { in CIFSGetSrvInodeNumber()
4702 cifs_dbg(FYI, "error %d in QueryInternalInfo\n", rc); in CIFSGetSrvInodeNumber()
4705 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetSrvInodeNumber()
4707 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetSrvInodeNumber()
4710 rc = -EIO; /* bad smb */ in CIFSGetSrvInodeNumber()
4718 rc = -EIO; in CIFSGetSrvInodeNumber()
4728 if (rc == -EAGAIN) in CIFSGetSrvInodeNumber()
4730 return rc; in CIFSGetSrvInodeNumber()
4742 int rc = 0; in CIFSGetDFSRefer() local
4759 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, ses->tcon_ipc, in CIFSGetDFSRefer()
4761 if (rc) in CIFSGetDFSRefer()
4762 return rc; in CIFSGetDFSRefer()
4815 rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, in CIFSGetDFSRefer()
4817 if (rc) { in CIFSGetDFSRefer()
4818 cifs_dbg(FYI, "Send error in GetDFSRefer = %d\n", rc); in CIFSGetDFSRefer()
4821 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSGetDFSRefer()
4824 if (rc || get_bcc(&pSMBr->hdr) < 17) { in CIFSGetDFSRefer()
4825 rc = -EIO; /* bad smb */ in CIFSGetDFSRefer()
4833 rc = parse_dfs_referrals(&pSMBr->dfs_data, in CIFSGetDFSRefer()
4842 if (rc == -EAGAIN) in CIFSGetDFSRefer()
4845 return rc; in CIFSGetDFSRefer()
4857 int rc = 0; in SMBOldQFSInfo() local
4863 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in SMBOldQFSInfo()
4865 if (rc) in SMBOldQFSInfo()
4866 return rc; in SMBOldQFSInfo()
4891 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in SMBOldQFSInfo()
4893 if (rc) { in SMBOldQFSInfo()
4894 cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); in SMBOldQFSInfo()
4896 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in SMBOldQFSInfo()
4898 if (rc || get_bcc(&pSMBr->hdr) < 18) in SMBOldQFSInfo()
4899 rc = -EIO; /* bad smb */ in SMBOldQFSInfo()
4930 if (rc == -EAGAIN) in SMBOldQFSInfo()
4933 return rc; in SMBOldQFSInfo()
4944 int rc = 0; in CIFSSMBQFSInfo() local
4950 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSInfo()
4952 if (rc) in CIFSSMBQFSInfo()
4953 return rc; in CIFSSMBQFSInfo()
4978 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSInfo()
4980 if (rc) { in CIFSSMBQFSInfo()
4981 cifs_dbg(FYI, "Send error in QFSInfo = %d\n", rc); in CIFSSMBQFSInfo()
4983 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSInfo()
4985 if (rc || get_bcc(&pSMBr->hdr) < 24) in CIFSSMBQFSInfo()
4986 rc = -EIO; /* bad smb */ in CIFSSMBQFSInfo()
5017 if (rc == -EAGAIN) in CIFSSMBQFSInfo()
5020 return rc; in CIFSSMBQFSInfo()
5030 int rc = 0; in CIFSSMBQFSAttributeInfo() local
5036 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSAttributeInfo()
5038 if (rc) in CIFSSMBQFSAttributeInfo()
5039 return rc; in CIFSSMBQFSAttributeInfo()
5065 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSAttributeInfo()
5067 if (rc) { in CIFSSMBQFSAttributeInfo()
5068 cifs_dbg(VFS, "Send error in QFSAttributeInfo = %d\n", rc); in CIFSSMBQFSAttributeInfo()
5070 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSAttributeInfo()
5072 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSAttributeInfo()
5074 rc = -EIO; /* bad smb */ in CIFSSMBQFSAttributeInfo()
5087 if (rc == -EAGAIN) in CIFSSMBQFSAttributeInfo()
5090 return rc; in CIFSSMBQFSAttributeInfo()
5100 int rc = 0; in CIFSSMBQFSDeviceInfo() local
5106 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSDeviceInfo()
5108 if (rc) in CIFSSMBQFSDeviceInfo()
5109 return rc; in CIFSSMBQFSDeviceInfo()
5136 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSDeviceInfo()
5138 if (rc) { in CIFSSMBQFSDeviceInfo()
5139 cifs_dbg(FYI, "Send error in QFSDeviceInfo = %d\n", rc); in CIFSSMBQFSDeviceInfo()
5141 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSDeviceInfo()
5143 if (rc || get_bcc(&pSMBr->hdr) < in CIFSSMBQFSDeviceInfo()
5145 rc = -EIO; /* bad smb */ in CIFSSMBQFSDeviceInfo()
5158 if (rc == -EAGAIN) in CIFSSMBQFSDeviceInfo()
5161 return rc; in CIFSSMBQFSDeviceInfo()
5171 int rc = 0; in CIFSSMBQFSUnixInfo() local
5177 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, in CIFSSMBQFSUnixInfo()
5179 if (rc) in CIFSSMBQFSUnixInfo()
5180 return rc; in CIFSSMBQFSUnixInfo()
5206 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSUnixInfo()
5208 if (rc) { in CIFSSMBQFSUnixInfo()
5209 cifs_dbg(VFS, "Send error in QFSUnixInfo = %d\n", rc); in CIFSSMBQFSUnixInfo()
5211 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSUnixInfo()
5213 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSUnixInfo()
5214 rc = -EIO; /* bad smb */ in CIFSSMBQFSUnixInfo()
5227 if (rc == -EAGAIN) in CIFSSMBQFSUnixInfo()
5231 return rc; in CIFSSMBQFSUnixInfo()
5240 int rc = 0; in CIFSSMBSetFSUnixInfo() local
5247 rc = smb_init_no_reconnect(SMB_COM_TRANSACTION2, 15, tcon, in CIFSSMBSetFSUnixInfo()
5249 if (rc) in CIFSSMBSetFSUnixInfo()
5250 return rc; in CIFSSMBSetFSUnixInfo()
5289 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetFSUnixInfo()
5291 if (rc) { in CIFSSMBSetFSUnixInfo()
5292 cifs_dbg(VFS, "Send error in SETFSUnixInfo = %d\n", rc); in CIFSSMBSetFSUnixInfo()
5294 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBSetFSUnixInfo()
5295 if (rc) in CIFSSMBSetFSUnixInfo()
5296 rc = -EIO; /* bad smb */ in CIFSSMBSetFSUnixInfo()
5300 if (rc == -EAGAIN) in CIFSSMBSetFSUnixInfo()
5303 return rc; in CIFSSMBSetFSUnixInfo()
5316 int rc = 0; in CIFSSMBQFSPosixInfo() local
5322 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQFSPosixInfo()
5324 if (rc) in CIFSSMBQFSPosixInfo()
5325 return rc; in CIFSSMBQFSPosixInfo()
5351 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQFSPosixInfo()
5353 if (rc) { in CIFSSMBQFSPosixInfo()
5354 cifs_dbg(FYI, "Send error in QFSUnixInfo = %d\n", rc); in CIFSSMBQFSPosixInfo()
5356 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQFSPosixInfo()
5358 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSPosixInfo()
5359 rc = -EIO; /* bad smb */ in CIFSSMBQFSPosixInfo()
5395 if (rc == -EAGAIN) in CIFSSMBQFSPosixInfo()
5398 return rc; in CIFSSMBQFSPosixInfo()
5417 int rc = 0; in CIFSSMBSetEOF() local
5425 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetEOF()
5427 if (rc) in CIFSSMBSetEOF()
5428 return rc; in CIFSSMBSetEOF()
5484 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEOF()
5486 if (rc) in CIFSSMBSetEOF()
5487 cifs_dbg(FYI, "SetPathInfo (file size) returned %d\n", rc); in CIFSSMBSetEOF()
5491 if (rc == -EAGAIN) in CIFSSMBSetEOF()
5494 return rc; in CIFSSMBSetEOF()
5503 int rc = 0; in CIFSSMBSetFileSize() local
5508 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileSize()
5510 if (rc) in CIFSSMBSetFileSize()
5511 return rc; in CIFSSMBSetFileSize()
5562 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileSize()
5564 if (rc) { in CIFSSMBSetFileSize()
5566 rc); in CIFSSMBSetFileSize()
5572 return rc; in CIFSSMBSetFileSize()
5587 int rc = 0; in CIFSSMBSetFileInfo() local
5591 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileInfo()
5593 if (rc) in CIFSSMBSetFileInfo()
5594 return rc; in CIFSSMBSetFileInfo()
5634 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileInfo()
5636 if (rc) in CIFSSMBSetFileInfo()
5638 rc); in CIFSSMBSetFileInfo()
5643 return rc; in CIFSSMBSetFileInfo()
5652 int rc = 0; in CIFSSMBSetFileDisposition() local
5656 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBSetFileDisposition()
5658 if (rc) in CIFSSMBSetFileDisposition()
5659 return rc; in CIFSSMBSetFileDisposition()
5696 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBSetFileDisposition()
5698 if (rc) in CIFSSMBSetFileDisposition()
5699 cifs_dbg(FYI, "Send error in SetFileDisposition = %d\n", rc); in CIFSSMBSetFileDisposition()
5701 return rc; in CIFSSMBSetFileDisposition()
5713 int rc; in CIFSSMBSetPathInfoFB() local
5724 rc = CIFS_open(xid, &oparms, &oplock, NULL); in CIFSSMBSetPathInfoFB()
5725 if (rc) in CIFSSMBSetPathInfoFB()
5728 rc = CIFSSMBSetFileInfo(xid, tcon, data, fid.netfid, current->tgid); in CIFSSMBSetPathInfoFB()
5732 return rc; in CIFSSMBSetPathInfoFB()
5744 int rc = 0; in CIFSSMBSetPathInfo() local
5753 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetPathInfo()
5755 if (rc) in CIFSSMBSetPathInfo()
5756 return rc; in CIFSSMBSetPathInfo()
5801 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetPathInfo()
5803 if (rc) in CIFSSMBSetPathInfo()
5804 cifs_dbg(FYI, "SetPathInfo (times) returned %d\n", rc); in CIFSSMBSetPathInfo()
5808 if (rc == -EAGAIN) in CIFSSMBSetPathInfo()
5811 if (rc == -EOPNOTSUPP) in CIFSSMBSetPathInfo()
5815 return rc; in CIFSSMBSetPathInfo()
5872 int rc = 0; in CIFSSMBUnixSetFileInfo() local
5876 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); in CIFSSMBUnixSetFileInfo()
5878 if (rc) in CIFSSMBUnixSetFileInfo()
5879 return rc; in CIFSSMBUnixSetFileInfo()
5919 rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0); in CIFSSMBUnixSetFileInfo()
5921 if (rc) in CIFSSMBUnixSetFileInfo()
5923 rc); in CIFSSMBUnixSetFileInfo()
5928 return rc; in CIFSSMBUnixSetFileInfo()
5940 int rc = 0; in CIFSSMBUnixSetPathInfo() local
5947 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBUnixSetPathInfo()
5949 if (rc) in CIFSSMBUnixSetPathInfo()
5950 return rc; in CIFSSMBUnixSetPathInfo()
5995 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBUnixSetPathInfo()
5997 if (rc) in CIFSSMBUnixSetPathInfo()
5998 cifs_dbg(FYI, "SetPathInfo (perms) returned %d\n", rc); in CIFSSMBUnixSetPathInfo()
6001 if (rc == -EAGAIN) in CIFSSMBUnixSetPathInfo()
6003 return rc; in CIFSSMBUnixSetPathInfo()
6027 int rc = 0; in CIFSSMBQAllEAs() local
6039 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBQAllEAs()
6041 if (rc) in CIFSSMBQAllEAs()
6042 return rc; in CIFSSMBQAllEAs()
6079 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBQAllEAs()
6081 if (rc) { in CIFSSMBQAllEAs()
6082 cifs_dbg(FYI, "Send error in QueryAllEAs = %d\n", rc); in CIFSSMBQAllEAs()
6091 rc = validate_t2((struct smb_t2_rsp *)pSMBr); in CIFSSMBQAllEAs()
6092 if (rc || get_bcc(&pSMBr->hdr) < 4) { in CIFSSMBQAllEAs()
6093 rc = -EIO; /* bad smb */ in CIFSSMBQAllEAs()
6115 rc = -ENODATA; in CIFSSMBQAllEAs()
6123 rc = -EIO; in CIFSSMBQAllEAs()
6140 rc = -EIO; in CIFSSMBQAllEAs()
6149 rc = -EIO; in CIFSSMBQAllEAs()
6157 rc = value_len; in CIFSSMBQAllEAs()
6161 rc = -ERANGE; in CIFSSMBQAllEAs()
6169 rc += (5 + 1 + name_len); in CIFSSMBQAllEAs()
6170 if (rc < (int) buf_size) { in CIFSSMBQAllEAs()
6182 rc = -ERANGE; in CIFSSMBQAllEAs()
6192 rc = -ENODATA; in CIFSSMBQAllEAs()
6196 if (rc == -EAGAIN) in CIFSSMBQAllEAs()
6199 return (ssize_t)rc; in CIFSSMBQAllEAs()
6212 int rc = 0; in CIFSSMBSetEA() local
6219 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, in CIFSSMBSetEA()
6221 if (rc) in CIFSSMBSetEA()
6222 return rc; in CIFSSMBSetEA()
6292 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, in CIFSSMBSetEA()
6294 if (rc) in CIFSSMBSetEA()
6295 cifs_dbg(FYI, "SetPathInfo (EA) returned %d\n", rc); in CIFSSMBSetEA()
6299 if (rc == -EAGAIN) in CIFSSMBSetEA()
6302 return rc; in CIFSSMBSetEA()