Skip to content

Commit 02696ac

Browse files
hac-vsmfrench
authored andcommitted
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: Henrique Carvalho <henrique.carvalho@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent a940171 commit 02696ac

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

fs/smb/client/smb2pdu.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
240240
*/
241241
if (smb2_command != SMB2_TREE_DISCONNECT) {
242242
spin_unlock(&tcon->tc_lock);
243-
cifs_dbg(FYI, "can not send cmd %d while umounting\n",
244-
smb2_command);
243+
cifs_tcon_dbg(FYI, "can not send cmd %d while umounting\n",
244+
smb2_command);
245245
return -ENODEV;
246246
}
247247
}
@@ -296,9 +296,9 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
296296
return 0;
297297
}
298298
spin_unlock(&ses->chan_lock);
299-
cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
300-
tcon->ses->chans_need_reconnect,
301-
tcon->need_reconnect);
299+
cifs_tcon_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d\n",
300+
tcon->ses->chans_need_reconnect,
301+
tcon->need_reconnect);
302302

303303
mutex_lock(&ses->session_mutex);
304304
/*
@@ -392,11 +392,11 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
392392

393393
rc = cifs_tree_connect(0, tcon);
394394

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

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

448448
if (ses->chan_max > ses->chan_count &&
449449
ses->iface_count &&

0 commit comments

Comments
 (0)