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>
This commit is contained in:

committed by
Steve French

parent
f579cf3cfd
commit
488f1d2d6c
@@ -48,6 +48,7 @@
|
||||
#include "nterr.h"
|
||||
#include "rfc1002pdu.h"
|
||||
#include "cn_cifs.h"
|
||||
#include "fscache.h"
|
||||
|
||||
#define CIFS_PORT 445
|
||||
#define RFC1001_PORT 139
|
||||
@@ -1460,6 +1461,8 @@ cifs_put_tcp_session(struct TCP_Server_Info *server)
|
||||
server->tcpStatus = CifsExiting;
|
||||
spin_unlock(&GlobalMid_Lock);
|
||||
|
||||
cifs_fscache_release_client_cookie(server);
|
||||
|
||||
task = xchg(&server->tsk, NULL);
|
||||
if (task)
|
||||
force_sig(SIGKILL, task);
|
||||
@@ -1577,6 +1580,8 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
|
||||
list_add(&tcp_ses->tcp_ses_list, &cifs_tcp_ses_list);
|
||||
write_unlock(&cifs_tcp_ses_lock);
|
||||
|
||||
cifs_fscache_get_client_cookie(tcp_ses);
|
||||
|
||||
return tcp_ses;
|
||||
|
||||
out_err:
|
||||
|
Reference in New Issue
Block a user