aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifs_debug.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-08-08 17:10:16 -0400
committerSteve French <sfrench@us.ibm.com>2008-08-08 17:10:16 -0400
commitad8b15f0ffc297cdd6c65ef7552b3b8abd11a401 (patch)
treeee3fedbfb1e3be88898de6297e82f7e89cbac17d /fs/cifs/cifs_debug.c
parent0510eeb7367aca017c6320d04cfd9cbc3b5dd992 (diff)
[CIFS] list entry can not return null
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifs_debug.c')
-rw-r--r--fs/cifs/cifs_debug.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 688a2d42153f..69a12aae91d3 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -79,27 +79,25 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
79 spin_lock(&GlobalMid_Lock); 79 spin_lock(&GlobalMid_Lock);
80 list_for_each(tmp, &server->pending_mid_q) { 80 list_for_each(tmp, &server->pending_mid_q) {
81 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 81 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
82 if (mid_entry) { 82 cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d",
83 cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d", 83 mid_entry->midState,
84 mid_entry->midState, 84 (int)mid_entry->command,
85 (int)mid_entry->command, 85 mid_entry->pid,
86 mid_entry->pid, 86 mid_entry->tsk,
87 mid_entry->tsk, 87 mid_entry->mid));
88 mid_entry->mid));
89#ifdef CONFIG_CIFS_STATS2 88#ifdef CONFIG_CIFS_STATS2
90 cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld", 89 cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld",
91 mid_entry->largeBuf, 90 mid_entry->largeBuf,
92 mid_entry->resp_buf, 91 mid_entry->resp_buf,
93 mid_entry->when_received, 92 mid_entry->when_received,
94 jiffies)); 93 jiffies));
95#endif /* STATS2 */ 94#endif /* STATS2 */
96 cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp, 95 cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp,
97 mid_entry->multiEnd)); 96 mid_entry->multiEnd));
98 if (mid_entry->resp_buf) { 97 if (mid_entry->resp_buf) {
99 cifs_dump_detail(mid_entry->resp_buf); 98 cifs_dump_detail(mid_entry->resp_buf);
100 cifs_dump_mem("existing buf: ", 99 cifs_dump_mem("existing buf: ",
101 mid_entry->resp_buf, 62); 100 mid_entry->resp_buf, 62);
102 }
103 } 101 }
104 } 102 }
105 spin_unlock(&GlobalMid_Lock); 103 spin_unlock(&GlobalMid_Lock);
@@ -163,16 +161,13 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
163 mid_entry = list_entry(tmp1, struct 161 mid_entry = list_entry(tmp1, struct
164 mid_q_entry, 162 mid_q_entry,
165 qhead); 163 qhead);
166 if (mid_entry) { 164 seq_printf(m, "State: %d com: %d pid:"
167 seq_printf(m, 165 " %d tsk: %p mid %d\n",
168 "State: %d com: %d pid:" 166 mid_entry->midState,
169 " %d tsk: %p mid %d\n", 167 (int)mid_entry->command,
170 mid_entry->midState, 168 mid_entry->pid,
171 (int)mid_entry->command, 169 mid_entry->tsk,
172 mid_entry->pid, 170 mid_entry->mid);
173 mid_entry->tsk,
174 mid_entry->mid);
175 }
176 } 171 }
177 spin_unlock(&GlobalMid_Lock); 172 spin_unlock(&GlobalMid_Lock);
178 } 173 }