]> err.no Git - linux-2.6/blobdiff - fs/cifs/cifs_debug.c
Merge branch 'for_rmk_17' of git://git.mnementh.co.uk/linux-2.6-im
[linux-2.6] / fs / cifs / cifs_debug.c
index 73925a77375e6d89e40e03ef17aedf5c182b8aae..69a12aae91d313e832ae3e2002d3bdfc7732ecc6 100644 (file)
@@ -79,27 +79,25 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
        spin_lock(&GlobalMid_Lock);
        list_for_each(tmp, &server->pending_mid_q) {
                mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
-               if (mid_entry) {
-                       cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d",
-                               mid_entry->midState,
-                               (int)mid_entry->command,
-                               mid_entry->pid,
-                               mid_entry->tsk,
-                               mid_entry->mid));
+               cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d",
+                       mid_entry->midState,
+                       (int)mid_entry->command,
+                       mid_entry->pid,
+                       mid_entry->tsk,
+                       mid_entry->mid));
 #ifdef CONFIG_CIFS_STATS2
-                       cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld",
-                               mid_entry->largeBuf,
-                               mid_entry->resp_buf,
-                               mid_entry->when_received,
-                               jiffies));
+               cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld",
+                       mid_entry->largeBuf,
+                       mid_entry->resp_buf,
+                       mid_entry->when_received,
+                       jiffies));
 #endif /* STATS2 */
-                       cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp,
-                                 mid_entry->multiEnd));
-                       if (mid_entry->resp_buf) {
-                               cifs_dump_detail(mid_entry->resp_buf);
-                               cifs_dump_mem("existing buf: ",
-                                       mid_entry->resp_buf, 62);
-                       }
+               cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp,
+                         mid_entry->multiEnd));
+               if (mid_entry->resp_buf) {
+                       cifs_dump_detail(mid_entry->resp_buf);
+                       cifs_dump_mem("existing buf: ",
+                               mid_entry->resp_buf, 62);
                }
        }
        spin_unlock(&GlobalMid_Lock);
@@ -163,16 +161,13 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
                                mid_entry = list_entry(tmp1, struct
                                        mid_q_entry,
                                        qhead);
-                               if (mid_entry) {
-                                       seq_printf(m,
-                                                       "State: %d com: %d pid:"
-                                                       " %d tsk: %p mid %d\n",
-                                                       mid_entry->midState,
-                                                       (int)mid_entry->command,
-                                                       mid_entry->pid,
-                                                       mid_entry->tsk,
-                                                       mid_entry->mid);
-                               }
+                               seq_printf(m, "State: %d com: %d pid:"
+                                               " %d tsk: %p mid %d\n",
+                                               mid_entry->midState,
+                                               (int)mid_entry->command,
+                                               mid_entry->pid,
+                                               mid_entry->tsk,
+                                               mid_entry->mid);
                        }
                        spin_unlock(&GlobalMid_Lock);
                }
@@ -208,9 +203,9 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
                        seq_puts(m, " type: CDROM ");
                else
                        seq_printf(m, " type: %d ", dev_type);
-               if (tcon->tidStatus == CifsNeedReconnect) {
+
+               if (tcon->tidStatus == CifsNeedReconnect)
                        seq_puts(m, "\tDISCONNECTED ");
-               }
        }
        read_unlock(&GlobalSMBSeslock);
 
@@ -395,11 +390,16 @@ cifs_proc_init(void)
        proc_create("cifsFYI", 0, proc_fs_cifs, &cifsFYI_proc_fops);
        proc_create("traceSMB", 0, proc_fs_cifs, &traceSMB_proc_fops);
        proc_create("OplockEnabled", 0, proc_fs_cifs, &cifs_oplock_proc_fops);
-       proc_create("Experimental", 0, proc_fs_cifs, &cifs_experimental_proc_fops);
-       proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs, &cifs_linux_ext_proc_fops);
-       proc_create("MultiuserMount", 0, proc_fs_cifs, &cifs_multiuser_mount_proc_fops);
-       proc_create("SecurityFlags", 0, proc_fs_cifs, &cifs_security_flags_proc_fops);
-       proc_create("LookupCacheEnabled", 0, proc_fs_cifs, &cifs_lookup_cache_proc_fops);
+       proc_create("Experimental", 0, proc_fs_cifs,
+                   &cifs_experimental_proc_fops);
+       proc_create("LinuxExtensionsEnabled", 0, proc_fs_cifs,
+                   &cifs_linux_ext_proc_fops);
+       proc_create("MultiuserMount", 0, proc_fs_cifs,
+                   &cifs_multiuser_mount_proc_fops);
+       proc_create("SecurityFlags", 0, proc_fs_cifs,
+                   &cifs_security_flags_proc_fops);
+       proc_create("LookupCacheEnabled", 0, proc_fs_cifs,
+                   &cifs_lookup_cache_proc_fops);
 }
 
 void
@@ -655,9 +655,9 @@ static int cifs_multiuser_mount_proc_show(struct seq_file *m, void *v)
        return 0;
 }
 
-static int cifs_multiuser_mount_proc_open(struct inode *inode, struct file *file)
+static int cifs_multiuser_mount_proc_open(struct inode *inode, struct file *fh)
 {
-       return single_open(file, cifs_multiuser_mount_proc_show, NULL);
+       return single_open(fh, cifs_multiuser_mount_proc_show, NULL);
 }
 
 static ssize_t cifs_multiuser_mount_proc_write(struct file *file,