aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
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/cifsglob.h
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/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index cc8300c741b6..c265ebdcd177 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -419,6 +419,13 @@ cifs_sb_tcon(struct cifs_sb_info *cifs_sb)
419 return cifs_sb->ptcon; 419 return cifs_sb->ptcon;
420} 420}
421 421
422/* This function is always expected to succeed */
423static inline struct cifsTconInfo *
424cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb)
425{
426 return cifs_sb->ptcon;
427}
428
422static inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb) 429static inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb)
423{ 430{
424 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) 431 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)