Skip to content

Commit f446a63

Browse files
Paulo Alcantarasmfrench
authored andcommitted
cifs: return DFS root session id in DebugData
Return the DFS root session id in /proc/fs/cifs/DebugData to make it easier to track which IPC tcon was used to get new DFS referrals for a specific connection, and aids in debugging. A simple output of it would be Sessions: 1) Address: 192.168.1.13 Uses: 1 Capability: 0x300067 Session Status: 1 Security type: RawNTLMSSP SessionId: 0xd80000000009 User: 0 Cred User: 0 DFS root session id: 0x128006c000035 Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 396935d commit f446a63

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

fs/cifs/cifs_debug.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
420420
from_kuid(&init_user_ns, ses->linux_uid),
421421
from_kuid(&init_user_ns, ses->cred_uid));
422422

423+
if (ses->dfs_root_ses) {
424+
seq_printf(m, "\n\tDFS root session id: 0x%llx",
425+
ses->dfs_root_ses->Suid);
426+
}
427+
423428
spin_lock(&ses->chan_lock);
424429
if (CIFS_CHAN_NEEDS_RECONNECT(ses, 0))
425430
seq_puts(m, "\tPrimary channel: DISCONNECTED ");

0 commit comments

Comments
 (0)