From a6e8a8455c94565c53e1a1756d2ab9d9e3a902b8 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 20 Sep 2010 16:01:33 -0700 Subject: 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 Signed-off-by: Steve French --- fs/cifs/fscache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fs/cifs/fscache.c') diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c index 9f3f5c4..ec4318b0 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", -- cgit v1.1