Lines Matching refs:mnt_ctx

56 static int get_session(struct cifs_mount_ctx *mnt_ctx, const char *full_path)  in get_session()  argument
58 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx; in get_session()
62 rc = cifs_mount_get_session(mnt_ctx); in get_session()
74 static int add_root_smb_session(struct cifs_mount_ctx *mnt_ctx) in add_root_smb_session() argument
76 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx; in add_root_smb_session()
78 struct cifs_ses *ses = mnt_ctx->ses; in add_root_smb_session()
91 list_add_tail(&root_ses->list, &mnt_ctx->dfs_ses_list); in add_root_smb_session()
111 static int set_ref_paths(struct cifs_mount_ctx *mnt_ctx, in set_ref_paths() argument
115 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx; in set_ref_paths()
116 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in set_ref_paths()
139 static int __dfs_referral_walk(struct cifs_mount_ctx *mnt_ctx, in __dfs_referral_walk() argument
142 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx; in __dfs_referral_walk()
150 rc = dfs_get_referral(mnt_ctx, ref_walk_path(rw) + 1, in __dfs_referral_walk()
153 rc = cifs_mount_get_tcon(mnt_ctx); in __dfs_referral_walk()
155 rc = cifs_is_path_remote(mnt_ctx); in __dfs_referral_walk()
169 cifs_mount_put_conns(mnt_ctx); in __dfs_referral_walk()
170 rc = get_session(mnt_ctx, ref_walk_path(rw)); in __dfs_referral_walk()
179 rc = cifs_mount_get_tcon(mnt_ctx); in __dfs_referral_walk()
181 rc = cifs_is_path_remote(mnt_ctx); in __dfs_referral_walk()
189 rc = add_root_smb_session(mnt_ctx); in __dfs_referral_walk()
196 rc = set_ref_paths(mnt_ctx, &tgt, rw); in __dfs_referral_walk()
212 static int dfs_referral_walk(struct cifs_mount_ctx *mnt_ctx) in dfs_referral_walk() argument
222 rc = set_ref_paths(mnt_ctx, NULL, rw); in dfs_referral_walk()
224 rc = __dfs_referral_walk(mnt_ctx, rw); in dfs_referral_walk()
229 static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx) in __dfs_mount_share() argument
231 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in __dfs_mount_share()
232 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx; in __dfs_mount_share()
241 rc = dfs_referral_walk(mnt_ctx); in __dfs_mount_share()
245 tcon = mnt_ctx->tcon; in __dfs_mount_share()
254 list_replace_init(&mnt_ctx->dfs_ses_list, &tcon->dfs_ses_list); in __dfs_mount_share()
258 dfs_put_root_smb_sessions(&mnt_ctx->dfs_ses_list); in __dfs_mount_share()
286 int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx, bool *isdfs) in dfs_mount_share() argument
288 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx; in dfs_mount_share()
297 rc = get_session(mnt_ctx, NULL); in dfs_mount_share()
301 ctx->dfs_root_ses = mnt_ctx->ses; in dfs_mount_share()
310 rc = dfs_get_referral(mnt_ctx, ctx->UNC + 1, NULL, NULL); in dfs_mount_share()
319 rc = cifs_mount_get_tcon(mnt_ctx); in dfs_mount_share()
321 rc = cifs_is_path_remote(mnt_ctx); in dfs_mount_share()
326 add_root_smb_session(mnt_ctx); in dfs_mount_share()
327 return __dfs_mount_share(mnt_ctx); in dfs_mount_share()