aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSuresh Jayaraman <sjayaraman@suse.de>2010-07-05 08:42:15 -0400
committerSteve French <sfrench@us.ibm.com>2010-08-02 08:40:34 -0400
commit488f1d2d6cc9d665c9f09e4b54f77052732e3058 (patch)
tree2e240da84cdb009b89508e0fa748bebe71e35766 /fs/cifs/connect.c
parentf579cf3cfd1e19ae5aab6929679d0c04bf1a6284 (diff)
cifs: define server-level cache index objects and register them
Define server-level cache index objects (as managed by TCP_ServerInfo structs) and register then with FS-Cache. Each server object is created in the CIFS top-level index object and is itself an index into which superblock-level objects are inserted. The server objects are now keyed by {IPaddress,family,port} tuple. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 2208f06e4c45..90354e39e565 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -48,6 +48,7 @@
48#include "nterr.h" 48#include "nterr.h"
49#include "rfc1002pdu.h" 49#include "rfc1002pdu.h"
50#include "cn_cifs.h" 50#include "cn_cifs.h"
51#include "fscache.h"
51 52
52#define CIFS_PORT 445 53#define CIFS_PORT 445
53#define RFC1001_PORT 139 54#define RFC1001_PORT 139
@@ -1460,6 +1461,8 @@ cifs_put_tcp_session(struct TCP_Server_Info *server)
1460 server->tcpStatus = CifsExiting; 1461 server->tcpStatus = CifsExiting;
1461 spin_unlock(&GlobalMid_Lock); 1462 spin_unlock(&GlobalMid_Lock);
1462 1463
1464 cifs_fscache_release_client_cookie(server);
1465
1463 task = xchg(&server->tsk, NULL); 1466 task = xchg(&server->tsk, NULL);
1464 if (task) 1467 if (task)
1465 force_sig(SIGKILL, task); 1468 force_sig(SIGKILL, task);
@@ -1577,6 +1580,8 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
1577 list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list); 1580 list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list);
1578 write_unlock(&cifs_tcp_ses_lock); 1581 write_unlock(&cifs_tcp_ses_lock);
1579 1582
1583 cifs_fscache_get_client_cookie(tcp_ses);
1584
1580 return tcp_ses; 1585 return tcp_ses;
1581 1586
1582out_err: 1587out_err: