aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-12-26 13:53:34 -0500
committerSteve French <smfrench@gmail.com>2012-07-24 11:25:20 -0400
commit2dc7e1c03316940dec899fa3206a595de000e99b (patch)
treec74127806717b23e226b3ee81135d091d859bd7a /fs/cifs/transport.c
parentddfbefbd393fb1a935bdf27cba5ad2eb24a76e75 (diff)
CIFS: Make transport routines work with SMB2
Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r--fs/cifs/transport.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 904702db2526..bcc02b476f6e 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -35,10 +35,8 @@
35#include "cifsproto.h" 35#include "cifsproto.h"
36#include "cifs_debug.h" 36#include "cifs_debug.h"
37 37
38extern mempool_t *cifs_mid_poolp; 38void
39 39cifs_wake_up_task(struct mid_q_entry *mid)
40static void
41wake_up_task(struct mid_q_entry *mid)
42{ 40{
43 wake_up_process(mid->callback_data); 41 wake_up_process(mid->callback_data);
44} 42}
@@ -65,12 +63,13 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server)
65 /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ 63 /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */
66 /* when mid allocated can be before when sent */ 64 /* when mid allocated can be before when sent */
67 temp->when_alloc = jiffies; 65 temp->when_alloc = jiffies;
66 temp->server = server;
68 67
69 /* 68 /*
70 * The default is for the mid to be synchronous, so the 69 * The default is for the mid to be synchronous, so the
71 * default callback just wakes up the current task. 70 * default callback just wakes up the current task.
72 */ 71 */
73 temp->callback = wake_up_task; 72 temp->callback = cifs_wake_up_task;
74 temp->callback_data = current; 73 temp->callback_data = current;
75 } 74 }
76 75
@@ -83,6 +82,7 @@ void
83DeleteMidQEntry(struct mid_q_entry *midEntry) 82DeleteMidQEntry(struct mid_q_entry *midEntry)
84{ 83{
85#ifdef CONFIG_CIFS_STATS2 84#ifdef CONFIG_CIFS_STATS2
85 __le16 command = midEntry->server->vals->lock_cmd;
86 unsigned long now; 86 unsigned long now;
87#endif 87#endif
88 midEntry->mid_state = MID_FREE; 88 midEntry->mid_state = MID_FREE;
@@ -96,8 +96,7 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
96 /* commands taking longer than one second are indications that 96 /* commands taking longer than one second are indications that
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) && (midEntry->command != command)) {
100 (midEntry->command != cpu_to_le16(SMB_COM_LOCKING_ANDX))) {
101 printk(KERN_DEBUG " CIFS slow rsp: cmd %d mid %llu", 100 printk(KERN_DEBUG " CIFS slow rsp: cmd %d mid %llu",
102 midEntry->command, midEntry->mid); 101 midEntry->command, midEntry->mid);
103 printk(" A: 0x%lx S: 0x%lx R: 0x%lx\n", 102 printk(" A: 0x%lx S: 0x%lx R: 0x%lx\n",