Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88e7d705c4bdb729f02173583628ccbf49dba945
Commit:     88e7d705c4bdb729f02173583628ccbf49dba945
Parent:     97837582bc1e191d2792af74c1f3762ed01243b9
Author:     Steve French <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 3 17:37:09 2008 +0000
Committer:  Steve French <[EMAIL PROTECTED]>
CommitDate: Thu Jan 3 17:37:09 2008 +0000

    [CIFS] hold ses sem on tcp session reconnect during mount
    
    Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
    Signed-off-by: Steve French <[EMAIL PROTECTED]>
---
 fs/cifs/connect.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 658f58b..db3746c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1966,13 +1966,13 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info 
*cifs_sb,
                pSesInfo = existingCifsSes;
                cFYI(1, ("Existing smb sess found (status=%d)",
                        pSesInfo->status));
+               down(&pSesInfo->sesSem);
                if (pSesInfo->status == CifsNeedReconnect) {
                        cFYI(1, ("Session needs reconnect"));
-                       down(&pSesInfo->sesSem);
                        rc = cifs_setup_session(xid, pSesInfo,
                                                cifs_sb->local_nls);
-                       up(&pSesInfo->sesSem);
                }
+               up(&pSesInfo->sesSem);
        } else if (!rc) {
                cFYI(1, ("Existing smb sess not found"));
                pSesInfo = sesInfoAlloc();
@@ -3522,7 +3522,7 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info 
*cifs_sb)
                sesInfoFree(ses);
 
        FreeXid(xid);
-       return rc;      /* BB check if we should always return zero here */
+       return rc;
 }
 
 int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to