summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-16 12:59:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-16 12:59:11 -0700
commit03a7ab083e4d619136d6f07ce70fa9de0bc436fc (patch)
treea6b54d32e2c43991cd60193843ebef076e38d6d0 /fs
parent7bb419041bab2c0efa6e78e9e9e3d9c6ebc75fae (diff)
parent460cf3411b858ad509d5255e0dfaf862a83c0299 (diff)
downloadop-kernel-dev-03a7ab083e4d619136d6f07ce70fa9de0bc436fc.zip
op-kernel-dev-03a7ab083e4d619136d6f07ce70fa9de0bc436fc.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: fix potential double put of TCP session reference
Diffstat (limited to 'fs')
-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 67dad54..88c84a3 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1706,9 +1706,6 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
if (ses) {
cFYI(1, "Existing smb sess found (status=%d)", ses->status);
- /* existing SMB ses has a server reference already */
- cifs_put_tcp_session(server);
-
mutex_lock(&ses->session_mutex);
rc = cifs_negotiate_protocol(xid, ses);
if (rc) {
@@ -1731,6 +1728,9 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
}
}
mutex_unlock(&ses->session_mutex);
+
+ /* existing SMB ses has a server reference already */
+ cifs_put_tcp_session(server);
FreeXid(xid);
return ses;
}
OpenPOWER on IntegriCloud