Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel

Pull cifs fixes from Steve French:
"Four small smb3 fixes to the new mount API (including a particularly
important one for DFS links).

These were found in testing this week of additional DFS scenarios, and
a user testing of an apache container problem"

* tag '5.11-rc7-smb3-github' of git://github.com/smfrench/smb3-kernel:
cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
cifs: In the new mount api we get the full devname as source=
cifs: do not disable noperm if multiuser mount option is not provided
cifs: fix dfs-links

+28 -4
+1 -1
fs/cifs/cifsfs.c
··· 469 469 static int cifs_show_devname(struct seq_file *m, struct dentry *root) 470 470 { 471 471 struct cifs_sb_info *cifs_sb = CIFS_SB(root->d_sb); 472 - char *devname = kstrdup(cifs_sb->ctx->UNC, GFP_KERNEL); 472 + char *devname = kstrdup(cifs_sb->ctx->source, GFP_KERNEL); 473 473 474 474 if (devname == NULL) 475 475 seq_puts(m, "none");
+9
fs/cifs/connect.c
··· 2756 2756 cifs_sb->prepath = kstrdup(ctx->prepath, GFP_KERNEL); 2757 2757 if (cifs_sb->prepath == NULL) 2758 2758 return -ENOMEM; 2759 + cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH; 2759 2760 } 2760 2761 2761 2762 return 0; ··· 2984 2983 rc = PTR_ERR(mdata); 2985 2984 mdata = NULL; 2986 2985 } else { 2986 + /* 2987 + * We can not clear out the whole structure since we 2988 + * no longer have an explicit function to parse 2989 + * a mount-string. Instead we need to clear out the 2990 + * individual fields that are no longer valid. 2991 + */ 2992 + kfree(ctx->prepath); 2993 + ctx->prepath = NULL; 2987 2994 rc = cifs_setup_volume_info(ctx, mdata, fake_devname); 2988 2995 } 2989 2996 kfree(fake_devname);
+17 -3
fs/cifs/fs_context.c
··· 148 148 149 149 /* Mount options which take string value */ 150 150 fsparam_string("source", Opt_source), 151 - fsparam_string("unc", Opt_source), 152 151 fsparam_string("user", Opt_user), 153 152 fsparam_string("username", Opt_user), 154 153 fsparam_string("pass", Opt_pass), ··· 177 178 fsparam_flag_no("auto", Opt_ignore), 178 179 fsparam_string("cred", Opt_ignore), 179 180 fsparam_string("credentials", Opt_ignore), 181 + /* 182 + * UNC and prefixpath is now extracted from Opt_source 183 + * in the new mount API so we can just ignore them going forward. 184 + */ 185 + fsparam_string("unc", Opt_ignore), 180 186 fsparam_string("prefixpath", Opt_ignore), 181 187 {} 182 188 }; ··· 317 313 new_ctx->password = NULL; 318 314 new_ctx->domainname = NULL; 319 315 new_ctx->UNC = NULL; 316 + new_ctx->source = NULL; 320 317 new_ctx->iocharset = NULL; 321 318 322 319 /* ··· 328 323 DUP_CTX_STR(username); 329 324 DUP_CTX_STR(password); 330 325 DUP_CTX_STR(UNC); 326 + DUP_CTX_STR(source); 331 327 DUP_CTX_STR(domainname); 332 328 DUP_CTX_STR(nodename); 333 329 DUP_CTX_STR(iocharset); ··· 738 732 * just use what we already have in cifs_sb->ctx. 739 733 */ 740 734 STEAL_STRING(cifs_sb, ctx, UNC); 735 + STEAL_STRING(cifs_sb, ctx, source); 741 736 STEAL_STRING(cifs_sb, ctx, username); 742 737 STEAL_STRING(cifs_sb, ctx, password); 743 738 STEAL_STRING(cifs_sb, ctx, domainname); ··· 979 972 goto cifs_parse_mount_err; 980 973 default: 981 974 cifs_dbg(VFS, "Unknown error parsing devname\n"); 975 + goto cifs_parse_mount_err; 976 + } 977 + ctx->source = kstrdup(param->string, GFP_KERNEL); 978 + if (ctx->source == NULL) { 979 + cifs_dbg(VFS, "OOM when copying UNC string\n"); 982 980 goto cifs_parse_mount_err; 983 981 } 984 982 fc->source = kstrdup(param->string, GFP_KERNEL); ··· 1408 1396 ctx->password = NULL; 1409 1397 kfree(ctx->UNC); 1410 1398 ctx->UNC = NULL; 1399 + kfree(ctx->source); 1400 + ctx->source = NULL; 1411 1401 kfree(ctx->domainname); 1412 1402 ctx->domainname = NULL; 1413 1403 kfree(ctx->nodename); ··· 1547 1533 cifs_sb->mnt_cifs_flags |= (CIFS_MOUNT_MULTIUSER | 1548 1534 CIFS_MOUNT_NO_PERM); 1549 1535 else 1550 - cifs_sb->mnt_cifs_flags &= ~(CIFS_MOUNT_MULTIUSER | 1551 - CIFS_MOUNT_NO_PERM); 1536 + cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_MULTIUSER; 1537 + 1552 1538 1553 1539 if (ctx->strict_io) 1554 1540 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_STRICT_IO;
+1
fs/cifs/fs_context.h
··· 159 159 char *username; 160 160 char *password; 161 161 char *domainname; 162 + char *source; 162 163 char *UNC; 163 164 char *nodename; 164 165 char *iocharset; /* local code page for mapping to and from Unicode */