cifs: don't show domain= in mount output when domain is empty
authorRonnie Sahlberg <lsahlber@redhat.com>
Fri, 10 Aug 2018 01:31:10 +0000 (11:31 +1000)
committerSteve French <stfrench@microsoft.com>
Fri, 10 Aug 2018 16:53:51 +0000 (11:53 -0500)
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>
fs/cifs/cifsfs.c

index de16078e456b1ce316afab1ce3f0cf012abb4566..7065426b3280f95d495ec74df7c79b6b785b6688 100644 (file)
@@ -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) {