lkml.org 
[lkml]   [2008]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments
    Date

    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


    \
     
     \ /
      Last update: 2008-03-20 02:17    [W:0.023 / U:31.804 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site