aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-05-27 12:39:52 -0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-07-24 13:55:10 -0400
commit9224dfc2f92f4faff7b3d9e169255278129b47e8 (patch)
tree43a5736568aaf772a1612d15d55781d33a643fd5 /fs/cifs/cifsglob.h
parentbe4cb9e3d4ef7af1aaf66cebab1391ff91b48beb (diff)
CIFS: Move building path to root to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 2b1234599e7..340dce0ed07 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -164,6 +164,7 @@ struct cifs_ses;
164struct cifs_tcon; 164struct cifs_tcon;
165struct dfs_info3_param; 165struct dfs_info3_param;
166struct cifs_fattr; 166struct cifs_fattr;
167struct smb_vol;
167 168
168struct smb_version_operations { 169struct smb_version_operations {
169 int (*send_cancel)(struct TCP_Server_Info *, void *, 170 int (*send_cancel)(struct TCP_Server_Info *, void *,
@@ -227,6 +228,9 @@ struct smb_version_operations {
227 int (*get_srv_inum)(const unsigned int, struct cifs_tcon *, 228 int (*get_srv_inum)(const unsigned int, struct cifs_tcon *,
228 struct cifs_sb_info *, const char *, 229 struct cifs_sb_info *, const char *,
229 u64 *uniqueid, FILE_ALL_INFO *); 230 u64 *uniqueid, FILE_ALL_INFO *);
231 /* build a full path to the root of the mount */
232 char * (*build_path_to_root)(struct smb_vol *, struct cifs_sb_info *,
233 struct cifs_tcon *);
230}; 234};
231 235
232struct smb_version_values { 236struct smb_version_values {
@@ -803,6 +807,15 @@ convert_delimiter(char *path, char delim)
803 } 807 }
804} 808}
805 809
810static inline char *
811build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
812 struct cifs_tcon *tcon)
813{
814 if (!vol->ops->build_path_to_root)
815 return NULL;
816 return vol->ops->build_path_to_root(vol, cifs_sb, tcon);
817}
818
806#ifdef CONFIG_CIFS_STATS 819#ifdef CONFIG_CIFS_STATS
807#define cifs_stats_inc atomic_inc 820#define cifs_stats_inc atomic_inc
808 821