aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-20 19:01:35 -0400
committerSteve French <sfrench@us.ibm.com>2010-09-29 15:04:33 -0400
commit0d424ad0a4b8c08e45928bccfa5b4b240097b01b (patch)
tree40f383b138d2e8121cda4b28f1f7c4b9642fe5ec /fs/cifs/cifsfs.c
parentf6acb9d0596889a774e142ed76cb05b90d9763d2 (diff)
cifs: add cifs_sb_master_tcon and convert some callers to use it
At mount time, we'll always need to create a tcon that will serve as a template for others that are associated with the mount. This tcon is known as the "master" tcon. In some cases, we'll need to use that tcon regardless of who's accessing the mount. Add an accessor function for the master tcon and go ahead and switch the appropriate places to use it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index b9624abb7261..898d2a5cfad2 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -222,7 +222,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
222{ 222{
223 struct super_block *sb = dentry->d_sb; 223 struct super_block *sb = dentry->d_sb;
224 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 224 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
225 struct cifsTconInfo *tcon = cifs_sb_tcon(cifs_sb); 225 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb);
226 int rc = -EOPNOTSUPP; 226 int rc = -EOPNOTSUPP;
227 int xid; 227 int xid;
228 228
@@ -364,7 +364,7 @@ static int
364cifs_show_options(struct seq_file *s, struct vfsmount *m) 364cifs_show_options(struct seq_file *s, struct vfsmount *m)
365{ 365{
366 struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb); 366 struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb);
367 struct cifsTconInfo *tcon = cifs_sb_tcon(cifs_sb); 367 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb);
368 struct sockaddr *srcaddr; 368 struct sockaddr *srcaddr;
369 srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; 369 srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr;
370 370
@@ -455,7 +455,7 @@ static void cifs_umount_begin(struct super_block *sb)
455 if (cifs_sb == NULL) 455 if (cifs_sb == NULL)
456 return; 456 return;
457 457
458 tcon = cifs_sb_tcon(cifs_sb); 458 tcon = cifs_sb_master_tcon(cifs_sb);
459 459
460 read_lock(&cifs_tcp_ses_lock); 460 read_lock(&cifs_tcp_ses_lock);
461 if ((tcon->tc_count > 1) || (tcon->tidStatus == CifsExiting)) { 461 if ((tcon->tc_count > 1) || (tcon->tidStatus == CifsExiting)) {