summaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorGlauber Costa <glommer@parallels.com>2011-12-16 01:52:00 +0100
committerDavid S. Miller <davem@davemloft.net>2011-12-16 21:35:17 +0100
commitc607b2ed84929e143d9fb5653c4b5d0109147cde (patch)
tree6bb881df1115cb7fa045b94045cde43bd0684bf1 /include/net/sock.h
parentnet: fix sleeping while atomic problem in sock mem_cgroup. (diff)
downloadlinux-c607b2ed84929e143d9fb5653c4b5d0109147cde.tar.xz
linux-c607b2ed84929e143d9fb5653c4b5d0109147cde.zip
net: fix compilation with !CONFIG_NET
Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Glauber Costa <glommer@parallels.com> CC: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com> CC: David S. Miller <davem@davemloft.net> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/net/sock.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 6fe0dae81451..3144c7950649 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -66,8 +66,20 @@
struct cgroup;
struct cgroup_subsys;
+#ifdef CONFIG_NET
int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss);
void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss);
+#else
+static inline
+int mem_cgroup_sockets_init(struct cgroup *cgrp, struct cgroup_subsys *ss)
+{
+ return 0;
+}
+static inline
+void mem_cgroup_sockets_destroy(struct cgroup *cgrp, struct cgroup_subsys *ss)
+{
+}
+#endif
/*
* This structure really needs to be cleaned up.
* Most of it is for TCP, and not used by any of