aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/fscache.c
diff options
context:
space:
mode:
authorSuresh Jayaraman <sjayaraman@suse.de>2010-07-05 08:42:27 -0400
committerSteve French <sfrench@us.ibm.com>2010-08-02 08:40:36 -0400
commitd03382ce9a89dbe27cba25130f0b90c0d631d5c5 (patch)
treef2561981a606a788259ad10f0ec57f9486f85da4 /fs/cifs/fscache.c
parent8913007e67106597fed4b9dd3787e8dca6915a83 (diff)
cifs: define superblock-level cache index objects and register them
Define superblock-level cache index objects (managed by cifsTconInfo structs). Each superblock object is created in a server-level index object and in itself an index into which inode-level objects are inserted. The superblock object is keyed by sharename. The UniqueId/IndexNumber is used to validate that the exported share is the same since we accessed it last time. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/fscache.c')
-rw-r--r--fs/cifs/fscache.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
index ea97b76f8aa6..eba9beb94a4c 100644
--- a/fs/cifs/fscache.c
+++ b/fs/cifs/fscache.c
@@ -39,3 +39,20 @@ void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
39 server->fscache = NULL; 39 server->fscache = NULL;
40} 40}
41 41
42void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon)
43{
44 struct TCP_Server_Info *server = tcon->ses->server;
45
46 tcon->fscache =
47 fscache_acquire_cookie(server->fscache,
48 &cifs_fscache_super_index_def, tcon);
49 cFYI(1, "CIFS: get superblock cookie (0x%p/0x%p)",
50 server->fscache, tcon->fscache);
51}
52
53void cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon)
54{
55 cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache);
56 fscache_relinquish_cookie(tcon->fscache, 0);
57 tcon->fscache = NULL;
58}