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/link.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/link.c')
-rw-r--r-- | fs/cifs/link.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index cbf7b112287b..66db2d61fa43 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -249,7 +249,7 @@ CIFSCheckMFSymlink(struct cifs_fattr *fattr, | |||
249 | int rc; | 249 | int rc; |
250 | int oplock = 0; | 250 | int oplock = 0; |
251 | __u16 netfid = 0; | 251 | __u16 netfid = 0; |
252 | struct cifsTconInfo *pTcon = cifs_sb->tcon; | 252 | struct cifsTconInfo *pTcon = cifs_sb_tcon(cifs_sb); |
253 | u8 *buf; | 253 | u8 *buf; |
254 | char *pbuf; | 254 | char *pbuf; |
255 | unsigned int bytes_read = 0; | 255 | unsigned int bytes_read = 0; |
@@ -321,7 +321,7 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, | |||
321 | xid = GetXid(); | 321 | xid = GetXid(); |
322 | 322 | ||
323 | cifs_sb_target = CIFS_SB(inode->i_sb); | 323 | cifs_sb_target = CIFS_SB(inode->i_sb); |
324 | pTcon = cifs_sb_target->tcon; | 324 | pTcon = cifs_sb_tcon(cifs_sb_target); |
325 | 325 | ||
326 | /* No need to check for cross device links since server will do that | 326 | /* No need to check for cross device links since server will do that |
327 | BB note DFS case in future though (when we may have to check) */ | 327 | BB note DFS case in future though (when we may have to check) */ |
@@ -390,7 +390,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | |||
390 | char *full_path = NULL; | 390 | char *full_path = NULL; |
391 | char *target_path = NULL; | 391 | char *target_path = NULL; |
392 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 392 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
393 | struct cifsTconInfo *tcon = cifs_sb->tcon; | 393 | struct cifsTconInfo *tcon = cifs_sb_tcon(cifs_sb); |
394 | 394 | ||
395 | xid = GetXid(); | 395 | xid = GetXid(); |
396 | 396 | ||
@@ -459,7 +459,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname) | |||
459 | xid = GetXid(); | 459 | xid = GetXid(); |
460 | 460 | ||
461 | cifs_sb = CIFS_SB(inode->i_sb); | 461 | cifs_sb = CIFS_SB(inode->i_sb); |
462 | pTcon = cifs_sb->tcon; | 462 | pTcon = cifs_sb_tcon(cifs_sb); |
463 | 463 | ||
464 | full_path = build_path_from_dentry(direntry); | 464 | full_path = build_path_from_dentry(direntry); |
465 | 465 | ||