Lines Matching refs:ctx

199 cifs_parse_security_flavors(struct fs_context *fc, char *value, struct smb3_fs_context *ctx)  in cifs_parse_security_flavors()  argument
208 ctx->sectype = Unspecified; in cifs_parse_security_flavors()
209 ctx->sign = false; in cifs_parse_security_flavors()
216 ctx->sign = true; in cifs_parse_security_flavors()
219 ctx->sectype = Kerberos; in cifs_parse_security_flavors()
222 ctx->sign = true; in cifs_parse_security_flavors()
225 ctx->sectype = RawNTLMSSP; in cifs_parse_security_flavors()
228 ctx->sign = true; in cifs_parse_security_flavors()
231 ctx->sectype = NTLMv2; in cifs_parse_security_flavors()
234 ctx->nullauth = 1; in cifs_parse_security_flavors()
235 kfree(ctx->username); in cifs_parse_security_flavors()
236 ctx->username = NULL; in cifs_parse_security_flavors()
256 cifs_parse_cache_flavor(struct fs_context *fc, char *value, struct smb3_fs_context *ctx) in cifs_parse_cache_flavor() argument
262 ctx->direct_io = false; in cifs_parse_cache_flavor()
263 ctx->strict_io = false; in cifs_parse_cache_flavor()
264 ctx->cache_ro = false; in cifs_parse_cache_flavor()
265 ctx->cache_rw = false; in cifs_parse_cache_flavor()
268 ctx->direct_io = false; in cifs_parse_cache_flavor()
269 ctx->strict_io = true; in cifs_parse_cache_flavor()
270 ctx->cache_ro = false; in cifs_parse_cache_flavor()
271 ctx->cache_rw = false; in cifs_parse_cache_flavor()
274 ctx->direct_io = true; in cifs_parse_cache_flavor()
275 ctx->strict_io = false; in cifs_parse_cache_flavor()
276 ctx->cache_ro = false; in cifs_parse_cache_flavor()
277 ctx->cache_rw = false; in cifs_parse_cache_flavor()
280 ctx->direct_io = false; in cifs_parse_cache_flavor()
281 ctx->strict_io = false; in cifs_parse_cache_flavor()
282 ctx->cache_ro = true; in cifs_parse_cache_flavor()
283 ctx->cache_rw = false; in cifs_parse_cache_flavor()
286 ctx->direct_io = false; in cifs_parse_cache_flavor()
287 ctx->strict_io = false; in cifs_parse_cache_flavor()
288 ctx->cache_ro = false; in cifs_parse_cache_flavor()
289 ctx->cache_rw = true; in cifs_parse_cache_flavor()
300 if (ctx->field) { \
301 new_ctx->field = kstrdup(ctx->field, GFP_ATOMIC); \
310 smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx) in smb3_fs_context_dup() argument
312 memcpy(new_ctx, ctx, sizeof(*ctx)); in smb3_fs_context_dup()
341 cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_context *ctx, bool is_smb… in cifs_parse_smb_version() argument
357 ctx->ops = &smb1_operations; in cifs_parse_smb_version()
358 ctx->vals = &smb1_values; in cifs_parse_smb_version()
369 ctx->ops = &smb20_operations; in cifs_parse_smb_version()
370 ctx->vals = &smb20_values; in cifs_parse_smb_version()
381 ctx->ops = &smb21_operations; in cifs_parse_smb_version()
382 ctx->vals = &smb21_values; in cifs_parse_smb_version()
385 ctx->ops = &smb30_operations; in cifs_parse_smb_version()
386 ctx->vals = &smb30_values; in cifs_parse_smb_version()
389 ctx->ops = &smb30_operations; /* currently identical with 3.0 */ in cifs_parse_smb_version()
390 ctx->vals = &smb302_values; in cifs_parse_smb_version()
393 ctx->ops = &smb311_operations; in cifs_parse_smb_version()
394 ctx->vals = &smb311_values; in cifs_parse_smb_version()
397 ctx->ops = &smb30_operations; /* currently identical with 3.0 */ in cifs_parse_smb_version()
398 ctx->vals = &smb3any_values; in cifs_parse_smb_version()
401 ctx->ops = &smb30_operations; in cifs_parse_smb_version()
402 ctx->vals = &smbdefault_values; in cifs_parse_smb_version()
492 char *smb3_fs_context_fullpath(const struct smb3_fs_context *ctx, char dirsep) in smb3_fs_context_fullpath() argument
497 ulen = strlen(ctx->UNC); in smb3_fs_context_fullpath()
498 plen = ctx->prepath ? strlen(ctx->prepath) + 1 : 0; in smb3_fs_context_fullpath()
503 memcpy(s, ctx->UNC, ulen); in smb3_fs_context_fullpath()
506 memcpy(s + ulen + 1, ctx->prepath, plen); in smb3_fs_context_fullpath()
519 smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx) in smb3_parse_devname() argument
542 kfree(ctx->server_hostname); in smb3_parse_devname()
543 ctx->server_hostname = kstrndup(devname + 2, pos - devname - 2, GFP_KERNEL); in smb3_parse_devname()
544 if (!ctx->server_hostname) in smb3_parse_devname()
557 kfree(ctx->UNC); in smb3_parse_devname()
558 ctx->UNC = kstrndup(devname, pos - devname, GFP_KERNEL); in smb3_parse_devname()
559 if (!ctx->UNC) in smb3_parse_devname()
562 convert_delimiter(ctx->UNC, '\\'); in smb3_parse_devname()
568 kfree(ctx->prepath); in smb3_parse_devname()
569 ctx->prepath = NULL; in smb3_parse_devname()
575 ctx->prepath = cifs_sanitize_prepath(pos, GFP_KERNEL); in smb3_parse_devname()
576 if (IS_ERR(ctx->prepath)) { in smb3_parse_devname()
577 rc = PTR_ERR(ctx->prepath); in smb3_parse_devname()
578 ctx->prepath = NULL; in smb3_parse_devname()
669 struct smb3_fs_context *ctx = smb3_fc2context(fc); in smb3_fs_context_validate() local
671 if (ctx->rdma && ctx->vals->protocol_id < SMB30_PROT_ID) { in smb3_fs_context_validate()
678 if (ctx->multiuser) { in smb3_fs_context_validate()
684 if (ctx->got_version == false) in smb3_fs_context_validate()
688 if (!ctx->UNC) { in smb3_fs_context_validate()
694 if (strlen(ctx->UNC) < 3 || !strchr(ctx->UNC + 3, '\\')) { in smb3_fs_context_validate()
699 if (!ctx->got_ip) { in smb3_fs_context_validate()
705 slash = strchr(&ctx->UNC[2], '\\'); in smb3_fs_context_validate()
706 len = slash - &ctx->UNC[2]; in smb3_fs_context_validate()
707 if (!cifs_convert_address((struct sockaddr *)&ctx->dstaddr, in smb3_fs_context_validate()
708 &ctx->UNC[2], len)) { in smb3_fs_context_validate()
715 cifs_set_port((struct sockaddr *)&ctx->dstaddr, ctx->port); in smb3_fs_context_validate()
717 if (ctx->override_uid && !ctx->uid_specified) { in smb3_fs_context_validate()
718 ctx->override_uid = 0; in smb3_fs_context_validate()
722 if (ctx->override_gid && !ctx->gid_specified) { in smb3_fs_context_validate()
723 ctx->override_gid = 0; in smb3_fs_context_validate()
732 struct smb3_fs_context *ctx = smb3_fc2context(fc); in smb3_get_tree_common() local
736 root = cifs_smb3_do_mount(fc->fs_type, 0, ctx); in smb3_get_tree_common()
763 struct smb3_fs_context *ctx = smb3_fc2context(fc); in smb3_fs_context_free() local
765 smb3_cleanup_fs_context(ctx); in smb3_fs_context_free()
826 #define STEAL_STRING(cifs_sb, ctx, field) \ argument
828 kfree(ctx->field); \
829 ctx->field = cifs_sb->ctx->field; \
830 cifs_sb->ctx->field = NULL; \
833 #define STEAL_STRING_SENSITIVE(cifs_sb, ctx, field) \ argument
835 kfree_sensitive(ctx->field); \
836 ctx->field = cifs_sb->ctx->field; \
837 cifs_sb->ctx->field = NULL; \
842 struct smb3_fs_context *ctx = smb3_fc2context(fc); in smb3_reconfigure() local
847 rc = smb3_verify_reconfigure_ctx(fc, ctx, cifs_sb->ctx); in smb3_reconfigure()
857 STEAL_STRING(cifs_sb, ctx, UNC); in smb3_reconfigure()
858 STEAL_STRING(cifs_sb, ctx, source); in smb3_reconfigure()
859 STEAL_STRING(cifs_sb, ctx, username); in smb3_reconfigure()
860 STEAL_STRING_SENSITIVE(cifs_sb, ctx, password); in smb3_reconfigure()
861 STEAL_STRING(cifs_sb, ctx, domainname); in smb3_reconfigure()
862 STEAL_STRING(cifs_sb, ctx, nodename); in smb3_reconfigure()
863 STEAL_STRING(cifs_sb, ctx, iocharset); in smb3_reconfigure()
866 if (ctx->rsize == 0) in smb3_reconfigure()
867 ctx->rsize = cifs_sb->ctx->rsize; in smb3_reconfigure()
868 if (ctx->wsize == 0) in smb3_reconfigure()
869 ctx->wsize = cifs_sb->ctx->wsize; in smb3_reconfigure()
872 smb3_cleanup_fs_context_contents(cifs_sb->ctx); in smb3_reconfigure()
873 rc = smb3_fs_context_dup(cifs_sb->ctx, ctx); in smb3_reconfigure()
887 struct smb3_fs_context *ctx = smb3_fc2context(fc); in smb3_fs_context_parse_param() local
913 return ctx->sloppy ? 1 : opt; in smb3_fs_context_parse_param()
918 ctx->compression = UNKNOWN_TYPE; in smb3_fs_context_parse_param()
923 ctx->nodfs = 1; in smb3_fs_context_parse_param()
927 if (ctx->retry == 1) in smb3_fs_context_parse_param()
929 ctx->retry = 0; in smb3_fs_context_parse_param()
931 ctx->retry = 1; in smb3_fs_context_parse_param()
935 ctx->retry = 1; in smb3_fs_context_parse_param()
937 if (ctx->retry == 1) in smb3_fs_context_parse_param()
939 ctx->retry = 0; in smb3_fs_context_parse_param()
944 ctx->remap = false; in smb3_fs_context_parse_param()
946 ctx->remap = true; in smb3_fs_context_parse_param()
947 ctx->sfu_remap = false; /* disable SFU mapping */ in smb3_fs_context_parse_param()
952 ctx->sfu_remap = false; in smb3_fs_context_parse_param()
954 ctx->sfu_remap = true; in smb3_fs_context_parse_param()
955 ctx->remap = false; /* disable SFM (mapposix) mapping */ in smb3_fs_context_parse_param()
960 ctx->no_xattr = 1; in smb3_fs_context_parse_param()
962 ctx->no_xattr = 0; in smb3_fs_context_parse_param()
966 ctx->override_uid = 0; in smb3_fs_context_parse_param()
968 ctx->override_uid = 1; in smb3_fs_context_parse_param()
972 ctx->override_gid = 0; in smb3_fs_context_parse_param()
974 ctx->override_gid = 1; in smb3_fs_context_parse_param()
978 ctx->noperm = 1; in smb3_fs_context_parse_param()
980 ctx->noperm = 0; in smb3_fs_context_parse_param()
984 ctx->dynperm = 0; in smb3_fs_context_parse_param()
986 ctx->dynperm = 1; in smb3_fs_context_parse_param()
990 ctx->sfu_emul = 0; in smb3_fs_context_parse_param()
992 ctx->sfu_emul = 1; in smb3_fs_context_parse_param()
995 ctx->noblocksnd = 1; in smb3_fs_context_parse_param()
998 ctx->noautotune = 1; in smb3_fs_context_parse_param()
1001 ctx->no_lease = 1; in smb3_fs_context_parse_param()
1004 ctx->no_sparse = 1; in smb3_fs_context_parse_param()
1007 ctx->nodelete = 1; in smb3_fs_context_parse_param()
1011 ctx->multichannel = false; in smb3_fs_context_parse_param()
1012 ctx->max_channels = 1; in smb3_fs_context_parse_param()
1014 ctx->multichannel = true; in smb3_fs_context_parse_param()
1016 if (ctx->max_channels < 2) in smb3_fs_context_parse_param()
1017 ctx->max_channels = 2; in smb3_fs_context_parse_param()
1024 ctx->linux_uid = uid; in smb3_fs_context_parse_param()
1025 ctx->uid_specified = true; in smb3_fs_context_parse_param()
1031 ctx->cred_uid = uid; in smb3_fs_context_parse_param()
1032 ctx->cruid_specified = true; in smb3_fs_context_parse_param()
1038 ctx->backupuid = uid; in smb3_fs_context_parse_param()
1039 ctx->backupuid_specified = true; in smb3_fs_context_parse_param()
1045 ctx->backupgid = gid; in smb3_fs_context_parse_param()
1046 ctx->backupgid_specified = true; in smb3_fs_context_parse_param()
1052 ctx->linux_gid = gid; in smb3_fs_context_parse_param()
1053 ctx->gid_specified = true; in smb3_fs_context_parse_param()
1056 ctx->port = result.uint_32; in smb3_fs_context_parse_param()
1059 ctx->file_mode = result.uint_32; in smb3_fs_context_parse_param()
1062 ctx->dir_mode = result.uint_32; in smb3_fs_context_parse_param()
1065 ctx->min_offload = result.uint_32; in smb3_fs_context_parse_param()
1080 ctx->bsize = result.uint_32; in smb3_fs_context_parse_param()
1081 ctx->got_bsize = true; in smb3_fs_context_parse_param()
1101 ctx->rasize = result.uint_32; in smb3_fs_context_parse_param()
1104 ctx->rsize = result.uint_32; in smb3_fs_context_parse_param()
1105 ctx->got_rsize = true; in smb3_fs_context_parse_param()
1108 ctx->wsize = result.uint_32; in smb3_fs_context_parse_param()
1109 ctx->got_wsize = true; in smb3_fs_context_parse_param()
1112 ctx->acregmax = HZ * result.uint_32; in smb3_fs_context_parse_param()
1113 if (ctx->acregmax > CIFS_MAX_ACTIMEO) { in smb3_fs_context_parse_param()
1119 ctx->acdirmax = HZ * result.uint_32; in smb3_fs_context_parse_param()
1120 if (ctx->acdirmax > CIFS_MAX_ACTIMEO) { in smb3_fs_context_parse_param()
1130 if ((ctx->acdirmax != CIFS_DEF_ACTIMEO) || in smb3_fs_context_parse_param()
1131 (ctx->acregmax != CIFS_DEF_ACTIMEO)) { in smb3_fs_context_parse_param()
1135 ctx->acdirmax = ctx->acregmax = HZ * result.uint_32; in smb3_fs_context_parse_param()
1138 ctx->closetimeo = HZ * result.uint_32; in smb3_fs_context_parse_param()
1139 if (ctx->closetimeo > SMB3_MAX_DCLOSETIMEO) { in smb3_fs_context_parse_param()
1145 ctx->echo_interval = result.uint_32; in smb3_fs_context_parse_param()
1148 ctx->snapshot_time = result.uint_64; in smb3_fs_context_parse_param()
1156 ctx->max_credits = result.uint_32; in smb3_fs_context_parse_param()
1164 ctx->max_channels = result.uint_32; in smb3_fs_context_parse_param()
1167 ctx->multichannel = true; in smb3_fs_context_parse_param()
1175 ctx->max_cached_dirs = result.uint_32; in smb3_fs_context_parse_param()
1178 ctx->handle_timeout = result.uint_32; in smb3_fs_context_parse_param()
1179 if (ctx->handle_timeout > SMB3_MAX_HANDLE_TIMEOUT) { in smb3_fs_context_parse_param()
1185 kfree(ctx->UNC); in smb3_fs_context_parse_param()
1186 ctx->UNC = NULL; in smb3_fs_context_parse_param()
1187 switch (smb3_parse_devname(param->string, ctx)) { in smb3_fs_context_parse_param()
1200 ctx->source = smb3_fs_context_fullpath(ctx, '/'); in smb3_fs_context_parse_param()
1201 if (IS_ERR(ctx->source)) { in smb3_fs_context_parse_param()
1202 ctx->source = NULL; in smb3_fs_context_parse_param()
1206 fc->source = kstrdup(ctx->source, GFP_KERNEL); in smb3_fs_context_parse_param()
1213 kfree(ctx->username); in smb3_fs_context_parse_param()
1214 ctx->username = NULL; in smb3_fs_context_parse_param()
1215 if (ctx->nullauth) in smb3_fs_context_parse_param()
1219 ctx->nullauth = 1; in smb3_fs_context_parse_param()
1228 ctx->username = kstrdup(param->string, GFP_KERNEL); in smb3_fs_context_parse_param()
1229 if (ctx->username == NULL) { in smb3_fs_context_parse_param()
1235 kfree_sensitive(ctx->password); in smb3_fs_context_parse_param()
1236 ctx->password = NULL; in smb3_fs_context_parse_param()
1240 ctx->password = kstrdup(param->string, GFP_KERNEL); in smb3_fs_context_parse_param()
1241 if (ctx->password == NULL) { in smb3_fs_context_parse_param()
1248 ctx->got_ip = false; in smb3_fs_context_parse_param()
1251 if (!cifs_convert_address((struct sockaddr *)&ctx->dstaddr, in smb3_fs_context_parse_param()
1257 ctx->got_ip = true; in smb3_fs_context_parse_param()
1266 kfree(ctx->domainname); in smb3_fs_context_parse_param()
1267 ctx->domainname = kstrdup(param->string, GFP_KERNEL); in smb3_fs_context_parse_param()
1268 if (ctx->domainname == NULL) { in smb3_fs_context_parse_param()
1276 (struct sockaddr *)&ctx->srcaddr, in smb3_fs_context_parse_param()
1290 kfree(ctx->iocharset); in smb3_fs_context_parse_param()
1291 ctx->iocharset = kstrdup(param->string, GFP_KERNEL); in smb3_fs_context_parse_param()
1292 if (ctx->iocharset == NULL) { in smb3_fs_context_parse_param()
1300 cifs_dbg(FYI, "iocharset set to %s\n", ctx->iocharset); in smb3_fs_context_parse_param()
1303 memset(ctx->source_rfc1001_name, 0x20, in smb3_fs_context_parse_param()
1314 ctx->source_rfc1001_name[i] = param->string[i]; in smb3_fs_context_parse_param()
1324 memset(ctx->target_rfc1001_name, 0x20, in smb3_fs_context_parse_param()
1335 ctx->target_rfc1001_name[i] = param->string[i]; in smb3_fs_context_parse_param()
1359 if (cifs_parse_smb_version(fc, param->string, ctx, is_smb3) != 0) in smb3_fs_context_parse_param()
1361 ctx->got_version = true; in smb3_fs_context_parse_param()
1364 if (cifs_parse_security_flavors(fc, param->string, ctx) != 0) in smb3_fs_context_parse_param()
1368 if (cifs_parse_cache_flavor(fc, param->string, ctx) != 0) in smb3_fs_context_parse_param()
1376 ctx->witness = true; in smb3_fs_context_parse_param()
1384 ctx->rootfs = true; in smb3_fs_context_parse_param()
1388 ctx->posix_paths = 0; in smb3_fs_context_parse_param()
1390 ctx->posix_paths = 1; in smb3_fs_context_parse_param()
1394 if (ctx->linux_ext == 1) in smb3_fs_context_parse_param()
1396 ctx->linux_ext = 0; in smb3_fs_context_parse_param()
1397 ctx->no_linux_ext = 1; in smb3_fs_context_parse_param()
1399 if (ctx->no_linux_ext == 1) in smb3_fs_context_parse_param()
1401 ctx->linux_ext = 1; in smb3_fs_context_parse_param()
1402 ctx->no_linux_ext = 0; in smb3_fs_context_parse_param()
1406 ctx->nocase = 1; in smb3_fs_context_parse_param()
1415 if (ctx->file_mode == in smb3_fs_context_parse_param()
1417 ctx->file_mode = S_IALLUGO; in smb3_fs_context_parse_param()
1418 ctx->nobrl = 1; in smb3_fs_context_parse_param()
1420 ctx->nobrl = 0; in smb3_fs_context_parse_param()
1424 ctx->nohandlecache = 1; in smb3_fs_context_parse_param()
1426 ctx->nohandlecache = 0; in smb3_fs_context_parse_param()
1429 ctx->mand_lock = 1; in smb3_fs_context_parse_param()
1432 ctx->setuids = result.negated; in smb3_fs_context_parse_param()
1435 ctx->intr = !result.negated; in smb3_fs_context_parse_param()
1438 ctx->setuidfromacl = 1; in smb3_fs_context_parse_param()
1441 ctx->nostrictsync = result.negated; in smb3_fs_context_parse_param()
1444 ctx->server_ino = !result.negated; in smb3_fs_context_parse_param()
1447 ctx->rwpidforward = 1; in smb3_fs_context_parse_param()
1450 ctx->mode_ace = 1; in smb3_fs_context_parse_param()
1453 ctx->cifs_acl = !result.negated; in smb3_fs_context_parse_param()
1456 ctx->no_psx_acl = result.negated; in smb3_fs_context_parse_param()
1459 ctx->local_lease = 1; in smb3_fs_context_parse_param()
1462 ctx->sign = true; in smb3_fs_context_parse_param()
1465 ctx->sign = true; in smb3_fs_context_parse_param()
1466 ctx->ignore_signature = true; in smb3_fs_context_parse_param()
1474 ctx->seal = 1; in smb3_fs_context_parse_param()
1484 ctx->fsc = true; in smb3_fs_context_parse_param()
1487 ctx->mfsymlinks = true; in smb3_fs_context_parse_param()
1490 ctx->multiuser = true; in smb3_fs_context_parse_param()
1493 ctx->sloppy = true; in smb3_fs_context_parse_param()
1496 ctx->nosharesock = true; in smb3_fs_context_parse_param()
1500 ctx->nopersistent = true; in smb3_fs_context_parse_param()
1501 if (ctx->persistent) { in smb3_fs_context_parse_param()
1506 ctx->persistent = true; in smb3_fs_context_parse_param()
1507 if ((ctx->nopersistent) || (ctx->resilient)) { in smb3_fs_context_parse_param()
1515 ctx->resilient = false; /* already the default */ in smb3_fs_context_parse_param()
1517 ctx->resilient = true; in smb3_fs_context_parse_param()
1518 if (ctx->persistent) { in smb3_fs_context_parse_param()
1527 ctx->sockopt_tcp_nodelay = false; in smb3_fs_context_parse_param()
1529 ctx->sockopt_tcp_nodelay = true; in smb3_fs_context_parse_param()
1532 ctx->domainauto = true; in smb3_fs_context_parse_param()
1535 ctx->rdma = true; in smb3_fs_context_parse_param()
1543 kfree_sensitive(ctx->password); in smb3_fs_context_parse_param()
1544 ctx->password = NULL; in smb3_fs_context_parse_param()
1550 struct smb3_fs_context *ctx; in smb3_init_fs_context() local
1554 ctx = kzalloc(sizeof(struct smb3_fs_context), GFP_KERNEL); in smb3_init_fs_context()
1555 if (unlikely(!ctx)) in smb3_init_fs_context()
1558 strscpy(ctx->workstation_name, nodename, sizeof(ctx->workstation_name)); in smb3_init_fs_context()
1565 memset(ctx->source_rfc1001_name, 0x20, RFC1001_NAME_LEN); in smb3_init_fs_context()
1567 ctx->source_rfc1001_name[i] = toupper(nodename[i]); in smb3_init_fs_context()
1569 ctx->source_rfc1001_name[RFC1001_NAME_LEN] = 0; in smb3_init_fs_context()
1574 ctx->target_rfc1001_name[0] = 0; in smb3_init_fs_context()
1575 ctx->cred_uid = current_uid(); in smb3_init_fs_context()
1576 ctx->linux_uid = current_uid(); in smb3_init_fs_context()
1577 ctx->linux_gid = current_gid(); in smb3_init_fs_context()
1579 ctx->bsize = CIFS_DEFAULT_IOSIZE; /* can improve cp performance significantly */ in smb3_init_fs_context()
1580 ctx->rasize = 0; /* 0 = use default (ie negotiated rsize) for read ahead pages */ in smb3_init_fs_context()
1588 ctx->remap = true; in smb3_init_fs_context()
1591 ctx->dir_mode = ctx->file_mode = S_IRUGO | S_IXUGO | S_IWUSR; in smb3_init_fs_context()
1595 ctx->posix_paths = 1; in smb3_init_fs_context()
1597 ctx->server_ino = 1; in smb3_init_fs_context()
1600 ctx->strict_io = true; in smb3_init_fs_context()
1602 ctx->acregmax = CIFS_DEF_ACTIMEO; in smb3_init_fs_context()
1603 ctx->acdirmax = CIFS_DEF_ACTIMEO; in smb3_init_fs_context()
1604 ctx->closetimeo = SMB3_DEF_DCLOSETIMEO; in smb3_init_fs_context()
1605 ctx->max_cached_dirs = MAX_CACHED_FIDS; in smb3_init_fs_context()
1607 ctx->handle_timeout = 0; /* See MS-SMB2 spec section 2.2.14.2.12 */ in smb3_init_fs_context()
1610 ctx->ops = &smb30_operations; in smb3_init_fs_context()
1611 ctx->vals = &smbdefault_values; in smb3_init_fs_context()
1613 ctx->echo_interval = SMB_ECHO_INTERVAL_DEFAULT; in smb3_init_fs_context()
1616 ctx->multichannel = false; in smb3_init_fs_context()
1617 ctx->max_channels = 1; in smb3_init_fs_context()
1619 ctx->backupuid_specified = false; /* no backup intent for a user */ in smb3_init_fs_context()
1620 ctx->backupgid_specified = false; /* no backup intent for a group */ in smb3_init_fs_context()
1629 fc->fs_private = ctx; in smb3_init_fs_context()
1635 smb3_cleanup_fs_context_contents(struct smb3_fs_context *ctx) in smb3_cleanup_fs_context_contents() argument
1637 if (ctx == NULL) in smb3_cleanup_fs_context_contents()
1643 kfree(ctx->username); in smb3_cleanup_fs_context_contents()
1644 ctx->username = NULL; in smb3_cleanup_fs_context_contents()
1645 kfree_sensitive(ctx->password); in smb3_cleanup_fs_context_contents()
1646 ctx->password = NULL; in smb3_cleanup_fs_context_contents()
1647 kfree(ctx->server_hostname); in smb3_cleanup_fs_context_contents()
1648 ctx->server_hostname = NULL; in smb3_cleanup_fs_context_contents()
1649 kfree(ctx->UNC); in smb3_cleanup_fs_context_contents()
1650 ctx->UNC = NULL; in smb3_cleanup_fs_context_contents()
1651 kfree(ctx->source); in smb3_cleanup_fs_context_contents()
1652 ctx->source = NULL; in smb3_cleanup_fs_context_contents()
1653 kfree(ctx->domainname); in smb3_cleanup_fs_context_contents()
1654 ctx->domainname = NULL; in smb3_cleanup_fs_context_contents()
1655 kfree(ctx->nodename); in smb3_cleanup_fs_context_contents()
1656 ctx->nodename = NULL; in smb3_cleanup_fs_context_contents()
1657 kfree(ctx->iocharset); in smb3_cleanup_fs_context_contents()
1658 ctx->iocharset = NULL; in smb3_cleanup_fs_context_contents()
1659 kfree(ctx->prepath); in smb3_cleanup_fs_context_contents()
1660 ctx->prepath = NULL; in smb3_cleanup_fs_context_contents()
1661 kfree(ctx->leaf_fullpath); in smb3_cleanup_fs_context_contents()
1662 ctx->leaf_fullpath = NULL; in smb3_cleanup_fs_context_contents()
1666 smb3_cleanup_fs_context(struct smb3_fs_context *ctx) in smb3_cleanup_fs_context() argument
1668 if (!ctx) in smb3_cleanup_fs_context()
1670 smb3_cleanup_fs_context_contents(ctx); in smb3_cleanup_fs_context()
1671 kfree(ctx); in smb3_cleanup_fs_context()
1676 struct smb3_fs_context *ctx = cifs_sb->ctx; in smb3_update_mnt_flags() local
1678 if (ctx->nodfs) in smb3_update_mnt_flags()
1683 if (ctx->noperm) in smb3_update_mnt_flags()
1688 if (ctx->setuids) in smb3_update_mnt_flags()
1693 if (ctx->setuidfromacl) in smb3_update_mnt_flags()
1698 if (ctx->server_ino) in smb3_update_mnt_flags()
1703 if (ctx->remap) in smb3_update_mnt_flags()
1708 if (ctx->sfu_remap) in smb3_update_mnt_flags()
1713 if (ctx->no_xattr) in smb3_update_mnt_flags()
1718 if (ctx->sfu_emul) in smb3_update_mnt_flags()
1723 if (ctx->nobrl) in smb3_update_mnt_flags()
1728 if (ctx->nohandlecache) in smb3_update_mnt_flags()
1733 if (ctx->nostrictsync) in smb3_update_mnt_flags()
1738 if (ctx->mand_lock) in smb3_update_mnt_flags()
1743 if (ctx->rwpidforward) in smb3_update_mnt_flags()
1748 if (ctx->mode_ace) in smb3_update_mnt_flags()
1753 if (ctx->cifs_acl) in smb3_update_mnt_flags()
1758 if (ctx->backupuid_specified) in smb3_update_mnt_flags()
1763 if (ctx->backupgid_specified) in smb3_update_mnt_flags()
1768 if (ctx->override_uid) in smb3_update_mnt_flags()
1773 if (ctx->override_gid) in smb3_update_mnt_flags()
1778 if (ctx->dynperm) in smb3_update_mnt_flags()
1783 if (ctx->fsc) in smb3_update_mnt_flags()
1788 if (ctx->multiuser) in smb3_update_mnt_flags()
1795 if (ctx->strict_io) in smb3_update_mnt_flags()
1800 if (ctx->direct_io) in smb3_update_mnt_flags()
1805 if (ctx->mfsymlinks) in smb3_update_mnt_flags()
1809 if (ctx->mfsymlinks) { in smb3_update_mnt_flags()
1810 if (ctx->sfu_emul) { in smb3_update_mnt_flags()