Commit 8e047d09 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French

cifs: use tcon pointer in cifs_show_options

Minor nit: we already have a tcon pointer so we don't need to
dereference cifs_sb again.

Also initialize the vars in the declaration.
Reported-by: default avatarPeter Staubach <staubach@redhat.com>
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 8c58b545
...@@ -361,13 +361,10 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server) ...@@ -361,13 +361,10 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
static int static int
cifs_show_options(struct seq_file *s, struct vfsmount *m) cifs_show_options(struct seq_file *s, struct vfsmount *m)
{ {
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb);
struct cifsTconInfo *tcon; struct cifsTconInfo *tcon = cifs_sb->tcon;
cifs_sb = CIFS_SB(m->mnt_sb);
tcon = cifs_sb->tcon;
seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName); seq_printf(s, ",unc=%s", tcon->treeName);
if (tcon->ses->userName) if (tcon->ses->userName)
seq_printf(s, ",username=%s", tcon->ses->userName); seq_printf(s, ",username=%s", tcon->ses->userName);
if (tcon->ses->domainName) if (tcon->ses->domainName)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment