summaryrefslogtreecommitdiffstats
path: root/fs/cifs/fscache.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-20 16:01:33 -0700
committerSteve French <sfrench@us.ibm.com>2010-09-29 19:04:32 +0000
commita6e8a8455c94565c53e1a1756d2ab9d9e3a902b8 (patch)
tree544628293da6aa14a136c915d887d0abdc689a03 /fs/cifs/fscache.c
parentba00ba64cf0895e4c2ac507e56306363dc125a90 (diff)
cifs: add function to get a tcon from cifs_sb
When we convert cifs to do multiple sessions per mount, we'll need more than one tcon per superblock. At that point "cifs_sb->tcon" will make no sense. Add a new accessor function that gets a tcon given a cifs_sb. For now, it just returns cifs_sb->tcon. Later it'll do more. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/fscache.c')
-rw-r--r--fs/cifs/fscache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
index 9f3f5c4be16..ec4318b019c 100644
--- a/fs/cifs/fscache.c
+++ b/fs/cifs/fscache.c
@@ -66,11 +66,11 @@ static void cifs_fscache_enable_inode_cookie(struct inode *inode)
if (cifsi->fscache)
return;
- cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache,
+ cifsi->fscache = fscache_acquire_cookie(cifs_sb_tcon(cifs_sb)->fscache,
&cifs_fscache_inode_object_def,
cifsi);
cFYI(1, "CIFS: got FH cookie (0x%p/0x%p)",
- cifs_sb->tcon->fscache, cifsi->fscache);
+ cifs_sb_tcon(cifs_sb)->fscache, cifsi->fscache);
}
void cifs_fscache_release_inode_cookie(struct inode *inode)
@@ -117,7 +117,8 @@ void cifs_fscache_reset_inode_cookie(struct inode *inode)
/* retire the current fscache cache and get a new one */
fscache_relinquish_cookie(cifsi->fscache, 1);
- cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache,
+ cifsi->fscache = fscache_acquire_cookie(
+ cifs_sb_tcon(cifs_sb)->fscache,
&cifs_fscache_inode_object_def,
cifsi);
cFYI(1, "CIFS: new cookie 0x%p oldcookie 0x%p",