Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154367
b: refs/heads/master
c: 61f98ff
h: refs/heads/master
i:
  154365: d5b97ae
  154363: 83f91bf
  154359: 3f19971
  154351: 890dfee
  154335: 27fd1e3
  154303: d1d910e
  154239: f0a9820
  154111: 51a4ebf
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Jun 15, 2009
1 parent 108ef05 commit 07a4023
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b70b92e41d95fd906f05f6e98f61209201495fa7
refs/heads/master: 61f98ffd74254a95871168bd5a6646b4f3002e31
33 changes: 22 additions & 11 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,27 @@ cifs_destroy_inode(struct inode *inode)
kmem_cache_free(cifs_inode_cachep, CIFS_I(inode));
}

static void
cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
{
seq_printf(s, ",addr=");

switch (server->addr.sockAddr.sin_family) {
case AF_INET:
seq_printf(s, "%pI4", &server->addr.sockAddr.sin_addr.s_addr);
break;
case AF_INET6:
seq_printf(s, "%pI6",
&server->addr.sockAddr6.sin6_addr.s6_addr);
if (server->addr.sockAddr6.sin6_scope_id)
seq_printf(s, "%%%u",
server->addr.sockAddr6.sin6_scope_id);
break;
default:
seq_printf(s, "(unknown)");
}
}

/*
* cifs_show_options() is for displaying mount options in /proc/mounts.
* Not all settable options are displayed but most of the important
Expand All @@ -343,7 +364,6 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
{
struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *tcon;
struct TCP_Server_Info *server;

cifs_sb = CIFS_SB(m->mnt_sb);
tcon = cifs_sb->tcon;
Expand All @@ -364,16 +384,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID)
seq_printf(s, ",forcegid");

server = tcon->ses->server;
seq_printf(s, ",addr=");
switch (server->addr.sockAddr6.sin6_family) {
case AF_INET6:
seq_printf(s, "%pI6", &server->addr.sockAddr6.sin6_addr);
break;
case AF_INET:
seq_printf(s, "%pI4", &server->addr.sockAddr.sin_addr.s_addr);
break;
}
cifs_show_address(s, tcon->ses->server);

if (!tcon->unix_ext)
seq_printf(s, ",file_mode=0%o,dir_mode=0%o",
Expand Down

0 comments on commit 07a4023

Please sign in to comment.