Quellcode durchsuchen

cifs: don't show domain= in mount output when domain is empty

Reported-by: Xiaoli Feng <xifeng@redhat.com>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Ronnie Sahlberg vor 7 Jahren
Ursprung
Commit
e55954a5f7
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      fs/cifs/cifsfs.c

+ 1 - 1
fs/cifs/cifsfs.c

@@ -432,7 +432,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
 	else if (tcon->ses->user_name)
 		seq_show_option(s, "username", tcon->ses->user_name);
 
-	if (tcon->ses->domainName)
+	if (tcon->ses->domainName && tcon->ses->domainName[0] != 0)
 		seq_show_option(s, "domain", tcon->ses->domainName);
 
 	if (srcaddr->sa_family != AF_UNSPEC) {