aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-01-03 12:37:09 -0500
committerSteve French <sfrench@us.ibm.com>2008-01-03 12:37:09 -0500
commit88e7d705c4bdb729f02173583628ccbf49dba945 (patch)
tree36cfa6c7f9b651e7ef88815e6bf7fb51e5f6cccb
parent97837582bc1e191d2792af74c1f3762ed01243b9 (diff)
[CIFS] hold ses sem on tcp session reconnect during mount
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r--fs/cifs/connect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 658f58b99e6f..db3746c891b5 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,
1966 pSesInfo = existingCifsSes; 1966 pSesInfo = existingCifsSes;
1967 cFYI(1, ("Existing smb sess found (status=%d)", 1967 cFYI(1, ("Existing smb sess found (status=%d)",
1968 pSesInfo->status)); 1968 pSesInfo->status));
1969 down(&pSesInfo->sesSem);
1969 if (pSesInfo->status == CifsNeedReconnect) { 1970 if (pSesInfo->status == CifsNeedReconnect) {
1970 cFYI(1, ("Session needs reconnect")); 1971 cFYI(1, ("Session needs reconnect"));
1971 down(&pSesInfo->sesSem);
1972 rc = cifs_setup_session(xid, pSesInfo, 1972 rc = cifs_setup_session(xid, pSesInfo,
1973 cifs_sb->local_nls); 1973 cifs_sb->local_nls);
1974 up(&pSesInfo->sesSem);
1975 } 1974 }
1975 up(&pSesInfo->sesSem);
1976 } else if (!rc) { 1976 } else if (!rc) {
1977 cFYI(1, ("Existing smb sess not found")); 1977 cFYI(1, ("Existing smb sess not found"));
1978 pSesInfo = sesInfoAlloc(); 1978 pSesInfo = sesInfoAlloc();
@@ -3522,7 +3522,7 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
3522 sesInfoFree(ses); 3522 sesInfoFree(ses);
3523 3523
3524 FreeXid(xid); 3524 FreeXid(xid);
3525 return rc; /* BB check if we should always return zero here */ 3525 return rc;
3526} 3526}
3527 3527
3528int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, 3528int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,