aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2011-12-30 04:27:43 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-30 16:44:24 -0500
commit257b529876cb45ec791eaa89e3d2ee0d16b49383 (patch)
treea052a1d16ae992cbfa5234af0cbfcea3a6cff6d7 /net/unix
parentc0636faa539ec4205ec50e80844a5b0454b4bbaa (diff)
unix_diag: Add the MEMINFO extension
[ Fix indentation of sock_diag*() calls. -DaveM ] Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix')
-rw-r--r--net/unix/diag.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/net/unix/diag.c b/net/unix/diag.c
index c5bdbcb1c30b..98945f29da4f 100644
--- a/net/unix/diag.c
+++ b/net/unix/diag.c
@@ -127,23 +127,27 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct unix_diag_r
127 sock_diag_save_cookie(sk, rep->udiag_cookie); 127 sock_diag_save_cookie(sk, rep->udiag_cookie);
128 128
129 if ((req->udiag_show & UDIAG_SHOW_NAME) && 129 if ((req->udiag_show & UDIAG_SHOW_NAME) &&
130 sk_diag_dump_name(sk, skb)) 130 sk_diag_dump_name(sk, skb))
131 goto nlmsg_failure; 131 goto nlmsg_failure;
132 132
133 if ((req->udiag_show & UDIAG_SHOW_VFS) && 133 if ((req->udiag_show & UDIAG_SHOW_VFS) &&
134 sk_diag_dump_vfs(sk, skb)) 134 sk_diag_dump_vfs(sk, skb))
135 goto nlmsg_failure; 135 goto nlmsg_failure;
136 136
137 if ((req->udiag_show & UDIAG_SHOW_PEER) && 137 if ((req->udiag_show & UDIAG_SHOW_PEER) &&
138 sk_diag_dump_peer(sk, skb)) 138 sk_diag_dump_peer(sk, skb))
139 goto nlmsg_failure; 139 goto nlmsg_failure;
140 140
141 if ((req->udiag_show & UDIAG_SHOW_ICONS) && 141 if ((req->udiag_show & UDIAG_SHOW_ICONS) &&
142 sk_diag_dump_icons(sk, skb)) 142 sk_diag_dump_icons(sk, skb))
143 goto nlmsg_failure; 143 goto nlmsg_failure;
144 144
145 if ((req->udiag_show & UDIAG_SHOW_RQLEN) && 145 if ((req->udiag_show & UDIAG_SHOW_RQLEN) &&
146 sk_diag_show_rqlen(sk, skb)) 146 sk_diag_show_rqlen(sk, skb))
147 goto nlmsg_failure;
148
149 if ((req->udiag_show & UDIAG_SHOW_MEMINFO) &&
150 sock_diag_put_meminfo(sk, skb, UNIX_DIAG_MEMINFO))
147 goto nlmsg_failure; 151 goto nlmsg_failure;
148 152
149 nlh->nlmsg_len = skb_tail_pointer(skb) - b; 153 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
@@ -191,9 +195,9 @@ static int unix_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
191 if (!(req->udiag_states & (1 << sk->sk_state))) 195 if (!(req->udiag_states & (1 << sk->sk_state)))
192 goto next; 196 goto next;
193 if (sk_diag_dump(sk, skb, req, 197 if (sk_diag_dump(sk, skb, req,
194 NETLINK_CB(cb->skb).pid, 198 NETLINK_CB(cb->skb).pid,
195 cb->nlh->nlmsg_seq, 199 cb->nlh->nlmsg_seq,
196 NLM_F_MULTI) < 0) 200 NLM_F_MULTI) < 0)
197 goto done; 201 goto done;
198next: 202next:
199 num++; 203 num++;