Commit 2275c6ba authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag '5.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs client fixes from Steve French:
 "Three reconnect fixes, all for stable as well.

  One of these three reconnect fixes does address a problem with
  multichannel reconnect, but this does not include the additional
  fix (still being tested) for dynamically detecting multichannel
  adapter changes which will improve those reconnect scenarios even
  more"

* tag '5.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: populate empty hostnames for extra channels
  cifs: return errors during session setup during reconnects
  cifs: fix reconnect on smb3 mount types
parents 3cae0d84 4c14d704
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1086,7 +1086,7 @@ struct file_system_type cifs_fs_type = {
};
MODULE_ALIAS_FS("cifs");

static struct file_system_type smb3_fs_type = {
struct file_system_type smb3_fs_type = {
	.owner = THIS_MODULE,
	.name = "smb3",
	.init_fs_context = smb3_init_fs_context,
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ static inline unsigned long cifs_get_time(struct dentry *dentry)
	return (unsigned long) dentry->d_fsdata;
}

extern struct file_system_type cifs_fs_type;
extern struct file_system_type cifs_fs_type, smb3_fs_type;
extern const struct address_space_operations cifs_addr_ops;
extern const struct address_space_operations cifs_addr_ops_smallbuf;

+4 −0
Original line number Diff line number Diff line
@@ -97,6 +97,10 @@ static int reconn_set_ipaddr_from_hostname(struct TCP_Server_Info *server)
	if (!server->hostname)
		return -EINVAL;

	/* if server hostname isn't populated, there's nothing to do here */
	if (server->hostname[0] == '\0')
		return 0;

	len = strlen(server->hostname) + 3;

	unc = kmalloc(len, GFP_KERNEL);
+16 −11
Original line number Diff line number Diff line
@@ -1211,11 +1211,13 @@ static struct super_block *__cifs_get_super(void (*f)(struct super_block *, void
		.data = data,
		.sb = NULL,
	};
	struct file_system_type **fs_type = (struct file_system_type *[]) {
		&cifs_fs_type, &smb3_fs_type, NULL,
	};

	iterate_supers_type(&cifs_fs_type, f, &sd);

	if (!sd.sb)
		return ERR_PTR(-EINVAL);
	for (; *fs_type; fs_type++) {
		iterate_supers_type(*fs_type, f, &sd);
		if (sd.sb) {
			/*
			 * Grab an active reference in order to prevent automounts (DFS links)
			 * of expiring and then freeing up our cifs superblock pointer while
@@ -1224,6 +1226,9 @@ static struct super_block *__cifs_get_super(void (*f)(struct super_block *, void
			cifs_sb_active(sd.sb);
			return sd.sb;
		}
	}
	return ERR_PTR(-EINVAL);
}

static void __cifs_put_super(struct super_block *sb)
{
+4 −1
Original line number Diff line number Diff line
@@ -301,7 +301,10 @@ cifs_ses_add_channel(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
	/* Auth */
	ctx.domainauto = ses->domainAuto;
	ctx.domainname = ses->domainName;
	ctx.server_hostname = ses->server->hostname;

	/* no hostname for extra channels */
	ctx.server_hostname = "";

	ctx.username = ses->user_name;
	ctx.password = ses->password;
	ctx.sectype = ses->sectype;
Loading