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>
This commit is contained in:
Jeff Layton
2010-09-20 16:01:33 -07:00
committed by Steve French
parent ba00ba64cf
commit a6e8a8455c
13 changed files with 74 additions and 71 deletions

View File

@@ -3026,8 +3026,8 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
int rc = 0;
char *tmp;
if (cifs_sb->tcon)
cifs_put_tcon(cifs_sb->tcon);
if (cifs_sb_tcon(cifs_sb))
cifs_put_tcon(cifs_sb_tcon(cifs_sb));
cifs_sb->tcon = NULL;
tmp = cifs_sb->prepath;