aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-03-23 14:28:03 -0400
committerJeff Layton <jlayton@redhat.com>2012-03-23 14:28:03 -0400
commit7c9421e1a9ce8d17816f480c3a5b4f2609442cd5 (patch)
tree6131acccc9898629df21a5c5a3e75ccf717bf947 /fs
parent243d04b6e6de7fd08578fffd28b890c0200a2ca5 (diff)
CIFS: Change mid_q_entry structure fields
to be protocol-unspecific and big enough to keep both CIFS and SMB2 values. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifs_debug.c20
-rw-r--r--fs/cifs/cifsglob.h10
-rw-r--r--fs/cifs/cifssmb.c12
-rw-r--r--fs/cifs/connect.c22
-rw-r--r--fs/cifs/misc.c2
-rw-r--r--fs/cifs/transport.c52
6 files changed, 59 insertions, 59 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index bcd0db783196..81be2637b57b 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -80,15 +80,15 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
80 spin_lock(&GlobalMid_Lock); 80 spin_lock(&GlobalMid_Lock);
81 list_for_each(tmp, &server->pending_mid_q) { 81 list_for_each(tmp, &server->pending_mid_q) {
82 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 82 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
83 cERROR(1, "State: %d Cmd: %d Pid: %d Cbdata: %p Mid %d", 83 cERROR(1, "State: %d Cmd: %d Pid: %d Cbdata: %p Mid %llu",
84 mid_entry->midState, 84 mid_entry->mid_state,
85 (int)mid_entry->command, 85 le16_to_cpu(mid_entry->command),
86 mid_entry->pid, 86 mid_entry->pid,
87 mid_entry->callback_data, 87 mid_entry->callback_data,
88 mid_entry->mid); 88 mid_entry->mid);
89#ifdef CONFIG_CIFS_STATS2 89#ifdef CONFIG_CIFS_STATS2
90 cERROR(1, "IsLarge: %d buf: %p time rcv: %ld now: %ld", 90 cERROR(1, "IsLarge: %d buf: %p time rcv: %ld now: %ld",
91 mid_entry->largeBuf, 91 mid_entry->large_buf,
92 mid_entry->resp_buf, 92 mid_entry->resp_buf,
93 mid_entry->when_received, 93 mid_entry->when_received,
94 jiffies); 94 jiffies);
@@ -218,12 +218,12 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
218 mid_entry = list_entry(tmp3, struct mid_q_entry, 218 mid_entry = list_entry(tmp3, struct mid_q_entry,
219 qhead); 219 qhead);
220 seq_printf(m, "\tState: %d com: %d pid:" 220 seq_printf(m, "\tState: %d com: %d pid:"
221 " %d cbdata: %p mid %d\n", 221 " %d cbdata: %p mid %llu\n",
222 mid_entry->midState, 222 mid_entry->mid_state,
223 (int)mid_entry->command, 223 le16_to_cpu(mid_entry->command),
224 mid_entry->pid, 224 mid_entry->pid,
225 mid_entry->callback_data, 225 mid_entry->callback_data,
226 mid_entry->mid); 226 mid_entry->mid);
227 } 227 }
228 spin_unlock(&GlobalMid_Lock); 228 spin_unlock(&GlobalMid_Lock);
229 } 229 }
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index b213458b852a..d5ccd467a1d1 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -731,8 +731,8 @@ typedef void (mid_callback_t)(struct mid_q_entry *mid);
731/* one of these for every pending CIFS request to the server */ 731/* one of these for every pending CIFS request to the server */
732struct mid_q_entry { 732struct mid_q_entry {
733 struct list_head qhead; /* mids waiting on reply from this server */ 733 struct list_head qhead; /* mids waiting on reply from this server */
734 __u16 mid; /* multiplex id */ 734 __u64 mid; /* multiplex id */
735 __u16 pid; /* process id */ 735 __u32 pid; /* process id */
736 __u32 sequence_number; /* for CIFS signing */ 736 __u32 sequence_number; /* for CIFS signing */
737 unsigned long when_alloc; /* when mid was created */ 737 unsigned long when_alloc; /* when mid was created */
738#ifdef CONFIG_CIFS_STATS2 738#ifdef CONFIG_CIFS_STATS2
@@ -743,9 +743,9 @@ struct mid_q_entry {
743 mid_callback_t *callback; /* call completion callback */ 743 mid_callback_t *callback; /* call completion callback */
744 void *callback_data; /* general purpose pointer for callback */ 744 void *callback_data; /* general purpose pointer for callback */
745 void *resp_buf; /* pointer to received SMB header */ 745 void *resp_buf; /* pointer to received SMB header */
746 int midState; /* wish this were enum but can not pass to wait_event */ 746 int mid_state; /* wish this were enum but can not pass to wait_event */
747 __u8 command; /* smb command code */ 747 __le16 command; /* smb command code */
748 bool largeBuf:1; /* if valid response, is pointer to large buf */ 748 bool large_buf:1; /* if valid response, is pointer to large buf */
749 bool multiRsp:1; /* multiple trans2 responses for one request */ 749 bool multiRsp:1; /* multiple trans2 responses for one request */
750 bool multiEnd:1; /* both received */ 750 bool multiEnd:1; /* both received */
751}; 751};
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c45d445e2094..f0b1c59a3bb3 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1467,7 +1467,7 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
1467 pgoff_t eof_index; 1467 pgoff_t eof_index;
1468 struct page *page, *tpage; 1468 struct page *page, *tpage;
1469 1469
1470 cFYI(1, "%s: mid=%u offset=%llu bytes=%u", __func__, 1470 cFYI(1, "%s: mid=%llu offset=%llu bytes=%u", __func__,
1471 mid->mid, rdata->offset, rdata->bytes); 1471 mid->mid, rdata->offset, rdata->bytes);
1472 1472
1473 /* 1473 /*
@@ -1665,10 +1665,10 @@ cifs_readv_callback(struct mid_q_entry *mid)
1665 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); 1665 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink);
1666 struct TCP_Server_Info *server = tcon->ses->server; 1666 struct TCP_Server_Info *server = tcon->ses->server;
1667 1667
1668 cFYI(1, "%s: mid=%u state=%d result=%d bytes=%u", __func__, 1668 cFYI(1, "%s: mid=%llu state=%d result=%d bytes=%u", __func__,
1669 mid->mid, mid->midState, rdata->result, rdata->bytes); 1669 mid->mid, mid->mid_state, rdata->result, rdata->bytes);
1670 1670
1671 switch (mid->midState) { 1671 switch (mid->mid_state) {
1672 case MID_RESPONSE_RECEIVED: 1672 case MID_RESPONSE_RECEIVED:
1673 /* result already set, check signature */ 1673 /* result already set, check signature */
1674 if (server->sec_mode & 1674 if (server->sec_mode &
@@ -2086,7 +2086,7 @@ cifs_writedata_alloc(unsigned int nr_pages)
2086} 2086}
2087 2087
2088/* 2088/*
2089 * Check the midState and signature on received buffer (if any), and queue the 2089 * Check the mid_state and signature on received buffer (if any), and queue the
2090 * workqueue completion task. 2090 * workqueue completion task.
2091 */ 2091 */
2092static void 2092static void
@@ -2097,7 +2097,7 @@ cifs_writev_callback(struct mid_q_entry *mid)
2097 unsigned int written; 2097 unsigned int written;
2098 WRITE_RSP *smb = (WRITE_RSP *)mid->resp_buf; 2098 WRITE_RSP *smb = (WRITE_RSP *)mid->resp_buf;
2099 2099
2100 switch (mid->midState) { 2100 switch (mid->mid_state) {
2101 case MID_RESPONSE_RECEIVED: 2101 case MID_RESPONSE_RECEIVED:
2102 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0); 2102 wdata->result = cifs_check_receive(mid, tcon->ses->server, 0);
2103 if (wdata->result != 0) 2103 if (wdata->result != 0)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 007d4dfcaf53..f3c932910b68 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -143,8 +143,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
143 spin_lock(&GlobalMid_Lock); 143 spin_lock(&GlobalMid_Lock);
144 list_for_each_safe(tmp, tmp2, &server->pending_mid_q) { 144 list_for_each_safe(tmp, tmp2, &server->pending_mid_q) {
145 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 145 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
146 if (mid_entry->midState == MID_REQUEST_SUBMITTED) 146 if (mid_entry->mid_state == MID_REQUEST_SUBMITTED)
147 mid_entry->midState = MID_RETRY_NEEDED; 147 mid_entry->mid_state = MID_RETRY_NEEDED;
148 list_move(&mid_entry->qhead, &retry_list); 148 list_move(&mid_entry->qhead, &retry_list);
149 } 149 }
150 spin_unlock(&GlobalMid_Lock); 150 spin_unlock(&GlobalMid_Lock);
@@ -575,8 +575,8 @@ find_mid(struct TCP_Server_Info *server, char *buffer)
575 spin_lock(&GlobalMid_Lock); 575 spin_lock(&GlobalMid_Lock);
576 list_for_each_entry(mid, &server->pending_mid_q, qhead) { 576 list_for_each_entry(mid, &server->pending_mid_q, qhead) {
577 if (mid->mid == buf->Mid && 577 if (mid->mid == buf->Mid &&
578 mid->midState == MID_REQUEST_SUBMITTED && 578 mid->mid_state == MID_REQUEST_SUBMITTED &&
579 mid->command == buf->Command) { 579 le16_to_cpu(mid->command) == buf->Command) {
580 spin_unlock(&GlobalMid_Lock); 580 spin_unlock(&GlobalMid_Lock);
581 return mid; 581 return mid;
582 } 582 }
@@ -593,9 +593,9 @@ dequeue_mid(struct mid_q_entry *mid, bool malformed)
593#endif 593#endif
594 spin_lock(&GlobalMid_Lock); 594 spin_lock(&GlobalMid_Lock);
595 if (!malformed) 595 if (!malformed)
596 mid->midState = MID_RESPONSE_RECEIVED; 596 mid->mid_state = MID_RESPONSE_RECEIVED;
597 else 597 else
598 mid->midState = MID_RESPONSE_MALFORMED; 598 mid->mid_state = MID_RESPONSE_MALFORMED;
599 list_del_init(&mid->qhead); 599 list_del_init(&mid->qhead);
600 spin_unlock(&GlobalMid_Lock); 600 spin_unlock(&GlobalMid_Lock);
601} 601}
@@ -622,13 +622,13 @@ handle_mid(struct mid_q_entry *mid, struct TCP_Server_Info *server,
622 } else { 622 } else {
623 /* Have first buffer */ 623 /* Have first buffer */
624 mid->resp_buf = buf; 624 mid->resp_buf = buf;
625 mid->largeBuf = true; 625 mid->large_buf = true;
626 server->bigbuf = NULL; 626 server->bigbuf = NULL;
627 } 627 }
628 return; 628 return;
629 } 629 }
630 mid->resp_buf = buf; 630 mid->resp_buf = buf;
631 mid->largeBuf = server->large_buf; 631 mid->large_buf = server->large_buf;
632 /* Was previous buf put in mpx struct for multi-rsp? */ 632 /* Was previous buf put in mpx struct for multi-rsp? */
633 if (!mid->multiRsp) { 633 if (!mid->multiRsp) {
634 /* smb buffer will be freed by user thread */ 634 /* smb buffer will be freed by user thread */
@@ -684,8 +684,8 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
684 spin_lock(&GlobalMid_Lock); 684 spin_lock(&GlobalMid_Lock);
685 list_for_each_safe(tmp, tmp2, &server->pending_mid_q) { 685 list_for_each_safe(tmp, tmp2, &server->pending_mid_q) {
686 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 686 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
687 cFYI(1, "Clearing mid 0x%x", mid_entry->mid); 687 cFYI(1, "Clearing mid 0x%llx", mid_entry->mid);
688 mid_entry->midState = MID_SHUTDOWN; 688 mid_entry->mid_state = MID_SHUTDOWN;
689 list_move(&mid_entry->qhead, &dispose_list); 689 list_move(&mid_entry->qhead, &dispose_list);
690 } 690 }
691 spin_unlock(&GlobalMid_Lock); 691 spin_unlock(&GlobalMid_Lock);
@@ -693,7 +693,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
693 /* now walk dispose list and issue callbacks */ 693 /* now walk dispose list and issue callbacks */
694 list_for_each_safe(tmp, tmp2, &dispose_list) { 694 list_for_each_safe(tmp, tmp2, &dispose_list) {
695 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 695 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
696 cFYI(1, "Callback mid 0x%x", mid_entry->mid); 696 cFYI(1, "Callback mid 0x%llx", mid_entry->mid);
697 list_del_init(&mid_entry->qhead); 697 list_del_init(&mid_entry->qhead);
698 mid_entry->callback(mid_entry); 698 mid_entry->callback(mid_entry);
699 } 699 }
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index d2ccce89062f..425e4f2a155c 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -268,7 +268,7 @@ __u64 GetNextMid(struct TCP_Server_Info *server)
268 list_for_each_entry(mid_entry, &server->pending_mid_q, qhead) { 268 list_for_each_entry(mid_entry, &server->pending_mid_q, qhead) {
269 ++num_mids; 269 ++num_mids;
270 if (mid_entry->mid == cur_mid && 270 if (mid_entry->mid == cur_mid &&
271 mid_entry->midState == MID_REQUEST_SUBMITTED) { 271 mid_entry->mid_state == MID_REQUEST_SUBMITTED) {
272 /* This mid is in use, try a different one */ 272 /* This mid is in use, try a different one */
273 collision = true; 273 collision = true;
274 break; 274 break;
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 66b4edec0e8e..0961336513d5 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -60,8 +60,8 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server)
60 memset(temp, 0, sizeof(struct mid_q_entry)); 60 memset(temp, 0, sizeof(struct mid_q_entry));
61 temp->mid = smb_buffer->Mid; /* always LE */ 61 temp->mid = smb_buffer->Mid; /* always LE */
62 temp->pid = current->pid; 62 temp->pid = current->pid;
63 temp->command = smb_buffer->Command; 63 temp->command = cpu_to_le16(smb_buffer->Command);
64 cFYI(1, "For smb_command %d", temp->command); 64 cFYI(1, "For smb_command %d", smb_buffer->Command);
65 /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ 65 /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */
66 /* when mid allocated can be before when sent */ 66 /* when mid allocated can be before when sent */
67 temp->when_alloc = jiffies; 67 temp->when_alloc = jiffies;
@@ -75,7 +75,7 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server)
75 } 75 }
76 76
77 atomic_inc(&midCount); 77 atomic_inc(&midCount);
78 temp->midState = MID_REQUEST_ALLOCATED; 78 temp->mid_state = MID_REQUEST_ALLOCATED;
79 return temp; 79 return temp;
80} 80}
81 81
@@ -85,9 +85,9 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
85#ifdef CONFIG_CIFS_STATS2 85#ifdef CONFIG_CIFS_STATS2
86 unsigned long now; 86 unsigned long now;
87#endif 87#endif
88 midEntry->midState = MID_FREE; 88 midEntry->mid_state = MID_FREE;
89 atomic_dec(&midCount); 89 atomic_dec(&midCount);
90 if (midEntry->largeBuf) 90 if (midEntry->large_buf)
91 cifs_buf_release(midEntry->resp_buf); 91 cifs_buf_release(midEntry->resp_buf);
92 else 92 else
93 cifs_small_buf_release(midEntry->resp_buf); 93 cifs_small_buf_release(midEntry->resp_buf);
@@ -97,8 +97,8 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
97 something is wrong, unless it is quite a slow link or server */ 97 something is wrong, unless it is quite a slow link or server */
98 if ((now - midEntry->when_alloc) > HZ) { 98 if ((now - midEntry->when_alloc) > HZ) {
99 if ((cifsFYI & CIFS_TIMER) && 99 if ((cifsFYI & CIFS_TIMER) &&
100 (midEntry->command != SMB_COM_LOCKING_ANDX)) { 100 (midEntry->command != cpu_to_le16(SMB_COM_LOCKING_ANDX))) {
101 printk(KERN_DEBUG " CIFS slow rsp: cmd %d mid %d", 101 printk(KERN_DEBUG " CIFS slow rsp: cmd %d mid %llu",
102 midEntry->command, midEntry->mid); 102 midEntry->command, midEntry->mid);
103 printk(" A: 0x%lx S: 0x%lx R: 0x%lx\n", 103 printk(" A: 0x%lx S: 0x%lx R: 0x%lx\n",
104 now - midEntry->when_alloc, 104 now - midEntry->when_alloc,
@@ -341,7 +341,7 @@ wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
341 int error; 341 int error;
342 342
343 error = wait_event_freezekillable(server->response_q, 343 error = wait_event_freezekillable(server->response_q,
344 midQ->midState != MID_REQUEST_SUBMITTED); 344 midQ->mid_state != MID_REQUEST_SUBMITTED);
345 if (error < 0) 345 if (error < 0)
346 return -ERESTARTSYS; 346 return -ERESTARTSYS;
347 347
@@ -404,7 +404,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
404 mid->receive = receive; 404 mid->receive = receive;
405 mid->callback = callback; 405 mid->callback = callback;
406 mid->callback_data = cbdata; 406 mid->callback_data = cbdata;
407 mid->midState = MID_REQUEST_SUBMITTED; 407 mid->mid_state = MID_REQUEST_SUBMITTED;
408 408
409 cifs_in_send_inc(server); 409 cifs_in_send_inc(server);
410 rc = smb_sendv(server, iov, nvec); 410 rc = smb_sendv(server, iov, nvec);
@@ -454,11 +454,11 @@ cifs_sync_mid_result(struct mid_q_entry *mid, struct TCP_Server_Info *server)
454{ 454{
455 int rc = 0; 455 int rc = 0;
456 456
457 cFYI(1, "%s: cmd=%d mid=%d state=%d", __func__, mid->command, 457 cFYI(1, "%s: cmd=%d mid=%llu state=%d", __func__,
458 mid->mid, mid->midState); 458 le16_to_cpu(mid->command), mid->mid, mid->mid_state);
459 459
460 spin_lock(&GlobalMid_Lock); 460 spin_lock(&GlobalMid_Lock);
461 switch (mid->midState) { 461 switch (mid->mid_state) {
462 case MID_RESPONSE_RECEIVED: 462 case MID_RESPONSE_RECEIVED:
463 spin_unlock(&GlobalMid_Lock); 463 spin_unlock(&GlobalMid_Lock);
464 return rc; 464 return rc;
@@ -473,8 +473,8 @@ cifs_sync_mid_result(struct mid_q_entry *mid, struct TCP_Server_Info *server)
473 break; 473 break;
474 default: 474 default:
475 list_del_init(&mid->qhead); 475 list_del_init(&mid->qhead);
476 cERROR(1, "%s: invalid mid state mid=%d state=%d", __func__, 476 cERROR(1, "%s: invalid mid state mid=%llu state=%d", __func__,
477 mid->mid, mid->midState); 477 mid->mid, mid->mid_state);
478 rc = -EIO; 478 rc = -EIO;
479 } 479 }
480 spin_unlock(&GlobalMid_Lock); 480 spin_unlock(&GlobalMid_Lock);
@@ -616,7 +616,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses,
616 return rc; 616 return rc;
617 } 617 }
618 618
619 midQ->midState = MID_REQUEST_SUBMITTED; 619 midQ->mid_state = MID_REQUEST_SUBMITTED;
620 cifs_in_send_inc(ses->server); 620 cifs_in_send_inc(ses->server);
621 rc = smb_sendv(ses->server, iov, n_vec); 621 rc = smb_sendv(ses->server, iov, n_vec);
622 cifs_in_send_dec(ses->server); 622 cifs_in_send_dec(ses->server);
@@ -638,7 +638,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses,
638 if (rc != 0) { 638 if (rc != 0) {
639 send_nt_cancel(ses->server, (struct smb_hdr *)buf, midQ); 639 send_nt_cancel(ses->server, (struct smb_hdr *)buf, midQ);
640 spin_lock(&GlobalMid_Lock); 640 spin_lock(&GlobalMid_Lock);
641 if (midQ->midState == MID_REQUEST_SUBMITTED) { 641 if (midQ->mid_state == MID_REQUEST_SUBMITTED) {
642 midQ->callback = DeleteMidQEntry; 642 midQ->callback = DeleteMidQEntry;
643 spin_unlock(&GlobalMid_Lock); 643 spin_unlock(&GlobalMid_Lock);
644 cifs_small_buf_release(buf); 644 cifs_small_buf_release(buf);
@@ -656,7 +656,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses,
656 return rc; 656 return rc;
657 } 657 }
658 658
659 if (!midQ->resp_buf || midQ->midState != MID_RESPONSE_RECEIVED) { 659 if (!midQ->resp_buf || midQ->mid_state != MID_RESPONSE_RECEIVED) {
660 rc = -EIO; 660 rc = -EIO;
661 cFYI(1, "Bad MID state?"); 661 cFYI(1, "Bad MID state?");
662 goto out; 662 goto out;
@@ -665,7 +665,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses,
665 buf = (char *)midQ->resp_buf; 665 buf = (char *)midQ->resp_buf;
666 iov[0].iov_base = buf; 666 iov[0].iov_base = buf;
667 iov[0].iov_len = get_rfc1002_length(buf) + 4; 667 iov[0].iov_len = get_rfc1002_length(buf) + 4;
668 if (midQ->largeBuf) 668 if (midQ->large_buf)
669 *pRespBufType = CIFS_LARGE_BUFFER; 669 *pRespBufType = CIFS_LARGE_BUFFER;
670 else 670 else
671 *pRespBufType = CIFS_SMALL_BUFFER; 671 *pRespBufType = CIFS_SMALL_BUFFER;
@@ -737,7 +737,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses,
737 goto out; 737 goto out;
738 } 738 }
739 739
740 midQ->midState = MID_REQUEST_SUBMITTED; 740 midQ->mid_state = MID_REQUEST_SUBMITTED;
741 741
742 cifs_in_send_inc(ses->server); 742 cifs_in_send_inc(ses->server);
743 rc = smb_send(ses->server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); 743 rc = smb_send(ses->server, in_buf, be32_to_cpu(in_buf->smb_buf_length));
@@ -755,7 +755,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses,
755 if (rc != 0) { 755 if (rc != 0) {
756 send_nt_cancel(ses->server, in_buf, midQ); 756 send_nt_cancel(ses->server, in_buf, midQ);
757 spin_lock(&GlobalMid_Lock); 757 spin_lock(&GlobalMid_Lock);
758 if (midQ->midState == MID_REQUEST_SUBMITTED) { 758 if (midQ->mid_state == MID_REQUEST_SUBMITTED) {
759 /* no longer considered to be "in-flight" */ 759 /* no longer considered to be "in-flight" */
760 midQ->callback = DeleteMidQEntry; 760 midQ->callback = DeleteMidQEntry;
761 spin_unlock(&GlobalMid_Lock); 761 spin_unlock(&GlobalMid_Lock);
@@ -772,7 +772,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses,
772 } 772 }
773 773
774 if (!midQ->resp_buf || !out_buf || 774 if (!midQ->resp_buf || !out_buf ||
775 midQ->midState != MID_RESPONSE_RECEIVED) { 775 midQ->mid_state != MID_RESPONSE_RECEIVED) {
776 rc = -EIO; 776 rc = -EIO;
777 cERROR(1, "Bad MID state?"); 777 cERROR(1, "Bad MID state?");
778 goto out; 778 goto out;
@@ -871,7 +871,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
871 return rc; 871 return rc;
872 } 872 }
873 873
874 midQ->midState = MID_REQUEST_SUBMITTED; 874 midQ->mid_state = MID_REQUEST_SUBMITTED;
875 cifs_in_send_inc(ses->server); 875 cifs_in_send_inc(ses->server);
876 rc = smb_send(ses->server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); 876 rc = smb_send(ses->server, in_buf, be32_to_cpu(in_buf->smb_buf_length));
877 cifs_in_send_dec(ses->server); 877 cifs_in_send_dec(ses->server);
@@ -885,13 +885,13 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
885 885
886 /* Wait for a reply - allow signals to interrupt. */ 886 /* Wait for a reply - allow signals to interrupt. */
887 rc = wait_event_interruptible(ses->server->response_q, 887 rc = wait_event_interruptible(ses->server->response_q,
888 (!(midQ->midState == MID_REQUEST_SUBMITTED)) || 888 (!(midQ->mid_state == MID_REQUEST_SUBMITTED)) ||
889 ((ses->server->tcpStatus != CifsGood) && 889 ((ses->server->tcpStatus != CifsGood) &&
890 (ses->server->tcpStatus != CifsNew))); 890 (ses->server->tcpStatus != CifsNew)));
891 891
892 /* Were we interrupted by a signal ? */ 892 /* Were we interrupted by a signal ? */
893 if ((rc == -ERESTARTSYS) && 893 if ((rc == -ERESTARTSYS) &&
894 (midQ->midState == MID_REQUEST_SUBMITTED) && 894 (midQ->mid_state == MID_REQUEST_SUBMITTED) &&
895 ((ses->server->tcpStatus == CifsGood) || 895 ((ses->server->tcpStatus == CifsGood) ||
896 (ses->server->tcpStatus == CifsNew))) { 896 (ses->server->tcpStatus == CifsNew))) {
897 897
@@ -921,7 +921,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
921 if (rc) { 921 if (rc) {
922 send_nt_cancel(ses->server, in_buf, midQ); 922 send_nt_cancel(ses->server, in_buf, midQ);
923 spin_lock(&GlobalMid_Lock); 923 spin_lock(&GlobalMid_Lock);
924 if (midQ->midState == MID_REQUEST_SUBMITTED) { 924 if (midQ->mid_state == MID_REQUEST_SUBMITTED) {
925 /* no longer considered to be "in-flight" */ 925 /* no longer considered to be "in-flight" */
926 midQ->callback = DeleteMidQEntry; 926 midQ->callback = DeleteMidQEntry;
927 spin_unlock(&GlobalMid_Lock); 927 spin_unlock(&GlobalMid_Lock);
@@ -939,7 +939,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
939 return rc; 939 return rc;
940 940
941 /* rcvd frame is ok */ 941 /* rcvd frame is ok */
942 if (out_buf == NULL || midQ->midState != MID_RESPONSE_RECEIVED) { 942 if (out_buf == NULL || midQ->mid_state != MID_RESPONSE_RECEIVED) {
943 rc = -EIO; 943 rc = -EIO;
944 cERROR(1, "Bad MID state?"); 944 cERROR(1, "Bad MID state?");
945 goto out; 945 goto out;