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

cifs: print session id while listing open files

In the output of /proc/fs/cifs/open_files, we only print
the tree id for the tcon of each open file. It becomes
difficult to know which tcon these files belong to with
just the tree id.

This change dumps ses id in addition to all other data today.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Shyam Prasad N and committed by
Steve French
175b54ab d12bc6d2

+3 -2
+3 -2
fs/cifs/cifs_debug.c
··· 176 176 177 177 seq_puts(m, "# Version:1\n"); 178 178 seq_puts(m, "# Format:\n"); 179 - seq_puts(m, "# <tree id> <persistent fid> <flags> <count> <pid> <uid>"); 179 + seq_puts(m, "# <tree id> <ses id> <persistent fid> <flags> <count> <pid> <uid>"); 180 180 #ifdef CONFIG_CIFS_DEBUG2 181 181 seq_printf(m, " <filename> <mid>\n"); 182 182 #else ··· 189 189 spin_lock(&tcon->open_file_lock); 190 190 list_for_each_entry(cfile, &tcon->openFileList, tlist) { 191 191 seq_printf(m, 192 - "0x%x 0x%llx 0x%x %d %d %d %pd", 192 + "0x%x 0x%llx 0x%llx 0x%x %d %d %d %pd", 193 193 tcon->tid, 194 + ses->Suid, 194 195 cfile->fid.persistent_fid, 195 196 cfile->f_flags, 196 197 cfile->count,