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>
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b2063ce..6e1fe3a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1837,6 +1837,7 @@
_FreeXid(xid);
tconInfoFree(tcon);
+ cifs_fscache_release_super_cookie(tcon);
cifs_put_smb_ses(ses);
}
@@ -1906,6 +1907,8 @@
list_add(&tcon->tcon_list, &ses->tcon_list);
write_unlock(&cifs_tcp_ses_lock);
+ cifs_fscache_get_super_cookie(tcon);
+
return tcon;
out_fail: