• Home
  • Raw
  • Download

Lines Matching refs:cifs_sb

65 	struct cifs_sb_info *cifs_sb;  member
2412 struct cifs_sb_info *new = mnt_data->cifs_sb; in compare_mount_options()
2460 struct cifs_sb_info *new = mnt_data->cifs_sb; in match_prepath()
2479 struct cifs_sb_info *cifs_sb; in cifs_match_super() local
2487 cifs_sb = CIFS_SB(sb); in cifs_match_super()
2490 if (CIFS_MOUNT_SHUTDOWN & cifs_sb->mnt_cifs_flags) { in cifs_match_super()
2495 tlink = cifs_get_tlink(cifs_sb_master_tlink(cifs_sb)); in cifs_match_super()
2794 struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) in reset_cifs_unix_caps() argument
2854 if (cifs_sb) in reset_cifs_unix_caps()
2855 cifs_sb->mnt_cifs_flags |= in reset_cifs_unix_caps()
2863 if (cifs_sb) in reset_cifs_unix_caps()
2864 cifs_sb->mnt_cifs_flags |= in reset_cifs_unix_caps()
2899 int cifs_setup_cifs_sb(struct cifs_sb_info *cifs_sb) in cifs_setup_cifs_sb() argument
2901 struct smb3_fs_context *ctx = cifs_sb->ctx; in cifs_setup_cifs_sb()
2903 INIT_DELAYED_WORK(&cifs_sb->prune_tlinks, cifs_prune_tlinks); in cifs_setup_cifs_sb()
2905 spin_lock_init(&cifs_sb->tlink_tree_lock); in cifs_setup_cifs_sb()
2906 cifs_sb->tlink_tree = RB_ROOT; in cifs_setup_cifs_sb()
2914 cifs_sb->local_nls = load_nls_default(); in cifs_setup_cifs_sb()
2916 cifs_sb->local_nls = load_nls(ctx->iocharset); in cifs_setup_cifs_sb()
2917 if (cifs_sb->local_nls == NULL) { in cifs_setup_cifs_sb()
2923 ctx->local_nls = cifs_sb->local_nls; in cifs_setup_cifs_sb()
2925 smb3_update_mnt_flags(cifs_sb); in cifs_setup_cifs_sb()
2931 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_RO_CACHE; in cifs_setup_cifs_sb()
2934 cifs_sb->mnt_cifs_flags |= (CIFS_MOUNT_RO_CACHE | in cifs_setup_cifs_sb()
2942 cifs_sb->prepath = kstrdup(ctx->prepath, GFP_KERNEL); in cifs_setup_cifs_sb()
2943 if (cifs_sb->prepath == NULL) in cifs_setup_cifs_sb()
2945 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; in cifs_setup_cifs_sb()
2962 mnt_ctx->cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_POSIX_PATHS; in mount_put_conns()
2974 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in mount_get_conns() local
3012 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS; in mount_get_conns()
3020 reset_cifs_unix_caps(xid, tcon, cifs_sb, ctx); in mount_get_conns()
3032 server->ops->qfs_tcon(xid, tcon, cifs_sb); in mount_get_conns()
3033 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RO_CACHE) { in mount_get_conns()
3037 else if ((cifs_sb->mnt_cifs_flags & in mount_get_conns()
3049 if ((cifs_sb->ctx->wsize == 0) || in mount_get_conns()
3050 (cifs_sb->ctx->wsize > server->ops->negotiate_wsize(tcon, ctx))) in mount_get_conns()
3051 cifs_sb->ctx->wsize = server->ops->negotiate_wsize(tcon, ctx); in mount_get_conns()
3052 if ((cifs_sb->ctx->rsize == 0) || in mount_get_conns()
3053 (cifs_sb->ctx->rsize > server->ops->negotiate_rsize(tcon, ctx))) in mount_get_conns()
3054 cifs_sb->ctx->rsize = server->ops->negotiate_rsize(tcon, ctx); in mount_get_conns()
3065 static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses, in mount_setup_tlink() argument
3081 cifs_sb->master_tlink = tlink; in mount_setup_tlink()
3082 spin_lock(&cifs_sb->tlink_tree_lock); in mount_setup_tlink()
3083 tlink_rb_insert(&cifs_sb->tlink_tree, tlink); in mount_setup_tlink()
3084 spin_unlock(&cifs_sb->tlink_tree_lock); in mount_setup_tlink()
3086 queue_delayed_work(cifsiod_wq, &cifs_sb->prune_tlinks, in mount_setup_tlink()
3114 const struct cifs_sb_info *cifs_sb, bool useppath) in build_unc_path_to_root() argument
3132 *pos = CIFS_DIR_SEP(cifs_sb); in build_unc_path_to_root()
3138 convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb)); in build_unc_path_to_root()
3153 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in expand_dfs_referral() local
3157 mdata = cifs_compose_mount_options(cifs_sb->ctx->mount_options, full_path + 1, referral, in expand_dfs_referral()
3173 kfree(cifs_sb->ctx->mount_options); in expand_dfs_referral()
3174 cifs_sb->ctx->mount_options = mdata; in expand_dfs_referral()
3235 struct cifs_sb_info *cifs_sb, in cifs_are_all_path_components_accessible() argument
3244 sep = CIFS_DIR_SEP(cifs_sb); in cifs_are_all_path_components_accessible()
3247 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, ""); in cifs_are_all_path_components_accessible()
3271 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, in cifs_are_all_path_components_accessible()
3285 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in is_path_remote() local
3298 full_path = cifs_build_path_to_root(ctx, cifs_sb, tcon, in is_path_remote()
3305 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, in is_path_remote()
3314 cifs_sb, full_path, tcon->Flags & SMB_SHARE_IS_IN_DFS); in is_path_remote()
3317 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; in is_path_remote()
3341 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in is_dfs_mount() local
3354 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS) || in is_dfs_mount()
3355 dfs_cache_find(mnt_ctx->xid, mnt_ctx->ses, cifs_sb->local_nls, cifs_remap(cifs_sb), in is_dfs_mount()
3374 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in connect_dfs_target() local
3375 char *oldmnt = cifs_sb->ctx->mount_options; in connect_dfs_target()
3386 if (oldmnt != cifs_sb->ctx->mount_options) { in connect_dfs_target()
3393 rc = dfs_cache_update_tgthint(mnt_ctx->xid, mnt_ctx->root_ses, cifs_sb->local_nls, in connect_dfs_target()
3394 cifs_remap(cifs_sb), ref_path, tit); in connect_dfs_target()
3406 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in connect_dfs_root() local
3418 full_path = build_unc_path_to_root(ctx, cifs_sb, true); in connect_dfs_root()
3422 mnt_ctx->origin_fullpath = dfs_cache_canonical_path(ctx->UNC, cifs_sb->local_nls, in connect_dfs_root()
3423 cifs_remap(cifs_sb)); in connect_dfs_root()
3450 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in __follow_dfs_link() local
3456 full_path = build_unc_path_to_root(ctx, cifs_sb, true); in __follow_dfs_link()
3461 mnt_ctx->leaf_fullpath = dfs_cache_canonical_path(full_path, cifs_sb->local_nls, in __follow_dfs_link()
3462 cifs_remap(cifs_sb)); in __follow_dfs_link()
3470 rc = dfs_cache_find(mnt_ctx->xid, mnt_ctx->root_ses, cifs_sb->local_nls, in __follow_dfs_link()
3471 cifs_remap(cifs_sb), mnt_ctx->leaf_fullpath + 1, NULL, &tl); in __follow_dfs_link()
3494 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb; in follow_dfs_link() local
3499 full_path = build_unc_path_to_root(ctx, cifs_sb, true); in follow_dfs_link()
3504 mnt_ctx->origin_fullpath = dfs_cache_canonical_path(full_path, cifs_sb->local_nls, in follow_dfs_link()
3505 cifs_remap(cifs_sb)); in follow_dfs_link()
3534 int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) in cifs_mount() argument
3537 struct mount_ctx mnt_ctx = { .cifs_sb = cifs_sb, .fs_ctx = ctx, }; in cifs_mount()
3565 cifs_autodisable_serverino(cifs_sb); in cifs_mount()
3570 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; in cifs_mount()
3571 kfree(cifs_sb->prepath); in cifs_mount()
3572 cifs_sb->prepath = ctx->prepath; in cifs_mount()
3574 uuid_copy(&cifs_sb->dfs_mount_id, &mnt_ctx.mount_id); in cifs_mount()
3577 cifs_try_adding_channels(cifs_sb, mnt_ctx.ses); in cifs_mount()
3578 rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); in cifs_mount()
3593 int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) in cifs_mount() argument
3596 struct mount_ctx mnt_ctx = { .cifs_sb = cifs_sb, .fs_ctx = ctx, }; in cifs_mount()
3610 rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon); in cifs_mount()
3754 struct cifs_sb_info *cifs_sb = container_of(p, struct cifs_sb_info, rcu); in delayed_free() local
3756 unload_nls(cifs_sb->local_nls); in delayed_free()
3757 smb3_cleanup_fs_context(cifs_sb->ctx); in delayed_free()
3758 kfree(cifs_sb); in delayed_free()
3762 cifs_umount(struct cifs_sb_info *cifs_sb) in cifs_umount() argument
3764 struct rb_root *root = &cifs_sb->tlink_tree; in cifs_umount()
3768 cancel_delayed_work_sync(&cifs_sb->prune_tlinks); in cifs_umount()
3770 spin_lock(&cifs_sb->tlink_tree_lock); in cifs_umount()
3777 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_umount()
3779 spin_lock(&cifs_sb->tlink_tree_lock); in cifs_umount()
3781 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_umount()
3783 kfree(cifs_sb->prepath); in cifs_umount()
3785 dfs_cache_put_refsrv_sessions(&cifs_sb->dfs_mount_id); in cifs_umount()
3787 call_rcu(&cifs_sb->rcu, delayed_free); in cifs_umount()
3862 cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) in cifs_construct_tcon() argument
3865 struct cifs_tcon *master_tcon = cifs_sb_master_tcon(cifs_sb); in cifs_construct_tcon()
3874 ctx->local_nls = cifs_sb->local_nls; in cifs_construct_tcon()
3929 cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb) in cifs_sb_master_tcon() argument
3931 return tlink_tcon(cifs_sb_master_tlink(cifs_sb)); in cifs_sb_master_tcon()
3992 cifs_sb_tlink(struct cifs_sb_info *cifs_sb) in cifs_sb_tlink() argument
3998 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER)) in cifs_sb_tlink()
3999 return cifs_get_tlink(cifs_sb_master_tlink(cifs_sb)); in cifs_sb_tlink()
4001 spin_lock(&cifs_sb->tlink_tree_lock); in cifs_sb_tlink()
4002 tlink = tlink_rb_search(&cifs_sb->tlink_tree, fsuid); in cifs_sb_tlink()
4005 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_sb_tlink()
4017 spin_lock(&cifs_sb->tlink_tree_lock); in cifs_sb_tlink()
4019 tlink = tlink_rb_search(&cifs_sb->tlink_tree, fsuid); in cifs_sb_tlink()
4022 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_sb_tlink()
4027 tlink_rb_insert(&cifs_sb->tlink_tree, tlink); in cifs_sb_tlink()
4028 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_sb_tlink()
4052 tlink->tl_tcon = cifs_construct_tcon(cifs_sb, fsuid); in cifs_sb_tlink()
4071 struct cifs_sb_info *cifs_sb = container_of(work, struct cifs_sb_info, in cifs_prune_tlinks() local
4073 struct rb_root *root = &cifs_sb->tlink_tree; in cifs_prune_tlinks()
4085 spin_lock(&cifs_sb->tlink_tree_lock); in cifs_prune_tlinks()
4101 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_prune_tlinks()
4103 spin_lock(&cifs_sb->tlink_tree_lock); in cifs_prune_tlinks()
4105 spin_unlock(&cifs_sb->tlink_tree_lock); in cifs_prune_tlinks()
4107 queue_delayed_work(cifsiod_wq, &cifs_sb->prune_tlinks, in cifs_prune_tlinks()
4125 static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb, in update_server_fullpath() argument
4151 npath = dfs_cache_canonical_path(refpath, cifs_sb->local_nls, cifs_remap(cifs_sb)); in update_server_fullpath()
4188 struct cifs_sb_info *cifs_sb, char *tree, in __tree_connect_dfs_target() argument
4239 rc = ops->tree_connect(xid, ipc->ses, tree, ipc, cifs_sb->local_nls); in __tree_connect_dfs_target()
4246 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
4255 if (dfs_cache_find(xid, tcon->ses, cifs_sb->local_nls, cifs_remap(cifs_sb), target, in __tree_connect_dfs_target()
4257 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
4262 rc = cifs_update_super_prepath(cifs_sb, prefix); in __tree_connect_dfs_target()
4266 rc = update_server_fullpath(server, cifs_sb, target); in __tree_connect_dfs_target()
4287 struct cifs_sb_info *cifs_sb, char *tree, in tree_connect_dfs_target() argument
4295 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, tl, ref); in tree_connect_dfs_target()
4318 struct cifs_sb_info *cifs_sb; in cifs_tree_connect() local
4340 cifs_sb = CIFS_SB(sb); in cifs_tree_connect()
4345 rc = ops->tree_connect(xid, tcon->ses, tcon->treeName, tcon, cifs_sb->local_nls); in cifs_tree_connect()
4349 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, &tl, &ref); in cifs_tree_connect()