]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/cifs/connect.c
[CIFS] redo existing session setup if needed in cifs_mount
[linux-2.6-omap-h63xx.git] / fs / cifs / connect.c
index fd9147cdb5a98d76b8a354b3b2a8efd518aeb565..658f58b99e6f5b1f00aaafb1c0b339fdb9698a97 100644 (file)
@@ -1964,7 +1964,15 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 
        if (existingCifsSes) {
                pSesInfo = existingCifsSes;
-               cFYI(1, ("Existing smb sess found"));
+               cFYI(1, ("Existing smb sess found (status=%d)",
+                       pSesInfo->status));
+               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);
+               }
        } else if (!rc) {
                cFYI(1, ("Existing smb sess not found"));
                pSesInfo = sesInfoAlloc();