summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-22 08:01:17 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-22 08:01:17 -0700
commitb33a7bad9bcb5c8453d7a13a99b3151ebe69563f (patch)
tree1de88006d14572e2f920f53bf173da41db3eb511 /net/socket.c
parent108e31587b9b9b4c6aaa99deb7f50c09c9f9b880 (diff)
[PATCH] slab: consolidate panic code
Many places do: if (kmem_cache_create(...) == NULL) panic(...); We can consolidate all that by passing another flag to kmem_cache_create() which says "panic if it doesn't work".
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c
index 0208cd47f66d..2e88afd10582 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -310,9 +310,9 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
static int init_inodecache(void)
{
sock_inode_cachep = kmem_cache_create("sock_inode_cache",
- sizeof(struct socket_alloc),
- 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
- init_once, NULL);
+ sizeof(struct socket_alloc),
+ 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
+ init_once, NULL);
if (sock_inode_cachep == NULL)
return -ENOMEM;
return 0;