Skip to content

Commit 1810769

Browse files
Paulo AlcantaraSteve French
authored andcommitted
cifs: print smb3_fs_context::source when mounting
Print full device name (UNC + optional prefix) from @old_ctx->source when printing info about mount. Before patch mount.cifs //srv/share/dir /mnt -o ... dmesg ... CIFS: Attempting to mount \\srv\share After patch mount.cifs //srv/share/dir /mnt -o ... dmesg ... CIFS: Attempting to mount //srv/share/dir Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 5bff9f7 commit 1810769

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

fs/cifs/cifsfs.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -874,14 +874,12 @@ cifs_smb3_do_mount(struct file_system_type *fs_type,
874874
struct cifs_mnt_data mnt_data;
875875
struct dentry *root;
876876

877-
/*
878-
* Prints in Kernel / CIFS log the attempted mount operation
879-
* If CIFS_DEBUG && cifs_FYI
880-
*/
881-
if (cifsFYI)
882-
cifs_dbg(FYI, "Devname: %s flags: %d\n", old_ctx->UNC, flags);
883-
else
884-
cifs_info("Attempting to mount %s\n", old_ctx->UNC);
877+
if (cifsFYI) {
878+
cifs_dbg(FYI, "%s: devname=%s flags=0x%x\n", __func__,
879+
old_ctx->source, flags);
880+
} else {
881+
cifs_info("Attempting to mount %s\n", old_ctx->source);
882+
}
885883

886884
cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
887885
if (cifs_sb == NULL) {

0 commit comments

Comments
 (0)