diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-09-20 19:01:33 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-09-29 15:04:32 -0400 |
commit | a6e8a8455c94565c53e1a1756d2ab9d9e3a902b8 (patch) | |
tree | 544628293da6aa14a136c915d887d0abdc689a03 /fs/cifs/fscache.c | |
parent | ba00ba64cf0895e4c2ac507e56306363dc125a90 (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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c index 9f3f5c4be161..ec4318b019cc 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) | |||
66 | if (cifsi->fscache) | 66 | if (cifsi->fscache) |
67 | return; | 67 | return; |
68 | 68 | ||
69 | cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache, | 69 | cifsi->fscache = fscache_acquire_cookie(cifs_sb_tcon(cifs_sb)->fscache, |
70 | &cifs_fscache_inode_object_def, | 70 | &cifs_fscache_inode_object_def, |
71 | cifsi); | 71 | cifsi); |
72 | cFYI(1, "CIFS: got FH cookie (0x%p/0x%p)", | 72 | cFYI(1, "CIFS: got FH cookie (0x%p/0x%p)", |
73 | cifs_sb->tcon->fscache, cifsi->fscache); | 73 | cifs_sb_tcon(cifs_sb)->fscache, cifsi->fscache); |
74 | } | 74 | } |
75 | 75 | ||
76 | void cifs_fscache_release_inode_cookie(struct inode *inode) | 76 | void cifs_fscache_release_inode_cookie(struct inode *inode) |
@@ -117,7 +117,8 @@ void cifs_fscache_reset_inode_cookie(struct inode *inode) | |||
117 | /* retire the current fscache cache and get a new one */ | 117 | /* retire the current fscache cache and get a new one */ |
118 | fscache_relinquish_cookie(cifsi->fscache, 1); | 118 | fscache_relinquish_cookie(cifsi->fscache, 1); |
119 | 119 | ||
120 | cifsi->fscache = fscache_acquire_cookie(cifs_sb->tcon->fscache, | 120 | cifsi->fscache = fscache_acquire_cookie( |
121 | cifs_sb_tcon(cifs_sb)->fscache, | ||
121 | &cifs_fscache_inode_object_def, | 122 | &cifs_fscache_inode_object_def, |
122 | cifsi); | 123 | cifsi); |
123 | cFYI(1, "CIFS: new cookie 0x%p oldcookie 0x%p", | 124 | cFYI(1, "CIFS: new cookie 0x%p oldcookie 0x%p", |