Commit 02696ac0 authored by Henrique Carvalho's avatar Henrique Carvalho Committed by Steve French
Browse files

smb: client: add tcon information to smb2_reconnect() debug messages

smb2_reconnect() debug messages lack tcon context, making it hard to
identify which tcon is reconnecting in multi-share environments.

Change cifs_dbg() to cifs_tcon_dbg() to include tcon information.

Closes: https://bugzilla.suse.com/show_bug.cgi?id=1234066


Signed-off-by: default avatarHenrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent a9401710
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -240,7 +240,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
		 */
		if (smb2_command != SMB2_TREE_DISCONNECT) {
			spin_unlock(&tcon->tc_lock);
			cifs_dbg(FYI, "can not send cmd %d while umounting\n",
			cifs_tcon_dbg(FYI, "can not send cmd %d while umounting\n",
				      smb2_command);
			return -ENODEV;
		}
@@ -296,7 +296,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
		return 0;
	}
	spin_unlock(&ses->chan_lock);
	cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
	cifs_tcon_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d\n",
		      tcon->ses->chans_need_reconnect,
		      tcon->need_reconnect);

@@ -392,11 +392,11 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,

	rc = cifs_tree_connect(0, tcon);

	cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc);
	cifs_tcon_dbg(FYI, "reconnect tcon rc = %d\n", rc);
	if (rc) {
		/* If sess reconnected but tcon didn't, something strange ... */
		mutex_unlock(&ses->session_mutex);
		cifs_dbg(VFS, "reconnect tcon failed rc = %d\n", rc);
		cifs_tcon_dbg(VFS, "reconnect tcon failed rc = %d\n", rc);
		goto out;
	}

@@ -442,7 +442,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
						       from_reconnect);
			goto skip_add_channels;
		} else if (rc)
			cifs_dbg(FYI, "%s: failed to query server interfaces: %d\n",
			cifs_tcon_dbg(FYI, "%s: failed to query server interfaces: %d\n",
				      __func__, rc);

		if (ses->chan_max > ses->chan_count &&