aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r--fs/cifs/netmisc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 581c225f7f50..d5ce9e26696c 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -110,7 +110,7 @@ static const struct smb_to_posix_error mapping_table_ERRSRV[] = {
110 {ERRnoroom, -ENOSPC}, 110 {ERRnoroom, -ENOSPC},
111 {ERRrmuns, -EUSERS}, 111 {ERRrmuns, -EUSERS},
112 {ERRtimeout, -ETIME}, 112 {ERRtimeout, -ETIME},
113 {ERRnoresource, -ENOBUFS}, 113 {ERRnoresource, -EREMOTEIO},
114 {ERRtoomanyuids, -EUSERS}, 114 {ERRtoomanyuids, -EUSERS},
115 {ERRbaduid, -EACCES}, 115 {ERRbaduid, -EACCES},
116 {ERRusempx, -EIO}, 116 {ERRusempx, -EIO},
@@ -412,7 +412,7 @@ static const struct {
412 from NT_STATUS_INSUFFICIENT_RESOURCES to 412 from NT_STATUS_INSUFFICIENT_RESOURCES to
413 NT_STATUS_INSUFF_SERVER_RESOURCES during the session setup } */ 413 NT_STATUS_INSUFF_SERVER_RESOURCES during the session setup } */
414 { 414 {
415 ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES}, { 415 ERRDOS, ERRnoresource, NT_STATUS_INSUFFICIENT_RESOURCES}, {
416 ERRDOS, ERRbadpath, NT_STATUS_DFS_EXIT_PATH_FOUND}, { 416 ERRDOS, ERRbadpath, NT_STATUS_DFS_EXIT_PATH_FOUND}, {
417 ERRDOS, 23, NT_STATUS_DEVICE_DATA_ERROR}, { 417 ERRDOS, 23, NT_STATUS_DEVICE_DATA_ERROR}, {
418 ERRHRD, ERRgeneral, NT_STATUS_DEVICE_NOT_CONNECTED}, { 418 ERRHRD, ERRgeneral, NT_STATUS_DEVICE_NOT_CONNECTED}, {
@@ -682,7 +682,7 @@ static const struct {
682 ERRHRD, ERRgeneral, NT_STATUS_NO_USER_SESSION_KEY}, { 682 ERRHRD, ERRgeneral, NT_STATUS_NO_USER_SESSION_KEY}, {
683 ERRDOS, 59, NT_STATUS_USER_SESSION_DELETED}, { 683 ERRDOS, 59, NT_STATUS_USER_SESSION_DELETED}, {
684 ERRHRD, ERRgeneral, NT_STATUS_RESOURCE_LANG_NOT_FOUND}, { 684 ERRHRD, ERRgeneral, NT_STATUS_RESOURCE_LANG_NOT_FOUND}, {
685 ERRDOS, ERRnomem, NT_STATUS_INSUFF_SERVER_RESOURCES}, { 685 ERRDOS, ERRnoresource, NT_STATUS_INSUFF_SERVER_RESOURCES}, {
686 ERRHRD, ERRgeneral, NT_STATUS_INVALID_BUFFER_SIZE}, { 686 ERRHRD, ERRgeneral, NT_STATUS_INVALID_BUFFER_SIZE}, {
687 ERRHRD, ERRgeneral, NT_STATUS_INVALID_ADDRESS_COMPONENT}, { 687 ERRHRD, ERRgeneral, NT_STATUS_INVALID_ADDRESS_COMPONENT}, {
688 ERRHRD, ERRgeneral, NT_STATUS_INVALID_ADDRESS_WILDCARD}, { 688 ERRHRD, ERRgeneral, NT_STATUS_INVALID_ADDRESS_WILDCARD}, {
@@ -913,8 +913,9 @@ map_smb_to_linux_error(char *buf, bool logErr)
913 * portion, the number of word parameters and the data portion of the message 913 * portion, the number of word parameters and the data portion of the message
914 */ 914 */
915unsigned int 915unsigned int
916smbCalcSize(struct smb_hdr *ptr) 916smbCalcSize(void *buf)
917{ 917{
918 struct smb_hdr *ptr = (struct smb_hdr *)buf;
918 return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) + 919 return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) +
919 2 /* size of the bcc field */ + get_bcc(ptr)); 920 2 /* size of the bcc field */ + get_bcc(ptr));
920} 921}