From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
Cc: Steve French <sfrench@samba.org>,
linux-cifs-client@lists.samba.org,
samba-technical@lists.samba.org
Subject: [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments
Date: Wed, 19 Mar 2008 18:11:14 -0700 [thread overview]
Message-ID: <1205975475-12708-3-git-send-email-joe@perches.com> (raw)
In-Reply-To: <1205975475-12708-2-git-send-email-joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/cifs/connect.c | 54 +++++++++++++++++++++++++---------------------------
1 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7c0e1ac..ca16fdc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -330,8 +330,9 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
}
static int
-cifs_demultiplex_thread(struct TCP_Server_Info *server)
+cifs_demultiplex_thread(void *data);
{
+ struct TCP_Server_Info *server = data;
int length;
unsigned int pdu_length, total_read;
struct smb_hdr *smb_buffer = NULL;
@@ -1367,35 +1368,31 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
list_for_each(tmp, &GlobalTreeConnectionList) {
cFYI(1, ("Next tcon"));
tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
- if (tcon->ses) {
- if (tcon->ses->server) {
- cFYI(1,
- ("old ip addr: %x == new ip %x ?",
- tcon->ses->server->addr.sockAddr.sin_addr.
- s_addr, new_target_ip_addr));
- if (tcon->ses->server->addr.sockAddr.sin_addr.
- s_addr == new_target_ip_addr) {
+ if (tcon->ses && tcon->ses->server) {
+ cFYI(1,
+ ("old ip addr: %x == new ip %x ?",
+ tcon->ses->server->addr.sockAddr.sin_addr.s_addr,
+ new_target_ip_addr));
+ if (tcon->ses->server->addr.sockAddr.sin_addr.s_addr ==
+ new_target_ip_addr) {
/* BB lock tcon, server and tcp session and increment use count here? */
- /* found a match on the TCP session */
- /* BB check if reconnection needed */
+ /* found a match on the TCP session */
+ /* BB check if reconnection needed */
+ cFYI(1,
+ ("IP match, old UNC: %s new: %s",
+ tcon->treeName, uncName));
+ if (strncmp(tcon->treeName, uncName,
+ MAX_TREE_SIZE) == 0) {
cFYI(1,
- ("IP match, old UNC: %s new: %s",
+ ("and old usr: %s new: %s",
tcon->treeName, uncName));
- if (strncmp
- (tcon->treeName, uncName,
- MAX_TREE_SIZE) == 0) {
- cFYI(1,
- ("and old usr: %s new: %s",
- tcon->treeName, uncName));
- if (strncmp
- (tcon->ses->userName,
- userName,
- MAX_USERNAME_SIZE) == 0) {
- read_unlock(&GlobalSMBSeslock);
- /* matched smb session
- (user name */
- return tcon;
- }
+ if (strncmp(tcon->ses->userName,
+ userName,
+ MAX_USERNAME_SIZE) == 0) {
+ read_unlock(&GlobalSMBSeslock);
+ /* matched smb session
+ (user name */
+ return tcon;
}
}
}
@@ -1973,7 +1970,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
so no need to spinlock this init of tcpStatus */
srvTcp->tcpStatus = CifsNew;
init_MUTEX(&srvTcp->tcpSem);
- srvTcp->tsk = kthread_run((void *)(void *)cifs_demultiplex_thread, srvTcp, "cifsd");
+ srvTcp->tsk = kthread_run(cifs_demultiplex_thread,
+ srvTcp, "cifsd");
if (IS_ERR(srvTcp->tsk)) {
rc = PTR_ERR(srvTcp->tsk);
cERROR(1, ("error %d create cifsd thread", rc));
--
1.5.4.rc2
next prev parent reply other threads:[~2008-03-20 1:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 1:11 [PATCH 1/4] fs/cifs - Pass cifs_sb->mnt_cifs_flags instead of cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR Joe Perches
2008-03-20 1:11 ` [PATCH 2/4] fs/cifs - Use bool Joe Perches
2008-03-20 1:11 ` Joe Perches [this message]
2008-03-20 1:11 ` [PATCH 4/4] fs/cifs - Align case labels to switch Joe Perches
2008-04-29 0:07 ` [PATCH 2/4] fs/cifs - Use bool Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1205975475-12708-3-git-send-email-joe@perches.com \
--to=joe@perches.com \
--cc=linux-cifs-client@lists.samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®