diff options
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/memory.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index da64df7576e1..7cd24bccd4fe 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c | |||
@@ -21,21 +21,19 @@ static struct kmem_cache *rsb_cache; | |||
21 | 21 | ||
22 | int __init dlm_memory_init(void) | 22 | int __init dlm_memory_init(void) |
23 | { | 23 | { |
24 | int ret = 0; | ||
25 | |||
26 | lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb), | 24 | lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb), |
27 | __alignof__(struct dlm_lkb), 0, NULL); | 25 | __alignof__(struct dlm_lkb), 0, NULL); |
28 | if (!lkb_cache) | 26 | if (!lkb_cache) |
29 | ret = -ENOMEM; | 27 | return -ENOMEM; |
30 | 28 | ||
31 | rsb_cache = kmem_cache_create("dlm_rsb", sizeof(struct dlm_rsb), | 29 | rsb_cache = kmem_cache_create("dlm_rsb", sizeof(struct dlm_rsb), |
32 | __alignof__(struct dlm_rsb), 0, NULL); | 30 | __alignof__(struct dlm_rsb), 0, NULL); |
33 | if (!rsb_cache) { | 31 | if (!rsb_cache) { |
34 | kmem_cache_destroy(lkb_cache); | 32 | kmem_cache_destroy(lkb_cache); |
35 | ret = -ENOMEM; | 33 | return -ENOMEM; |
36 | } | 34 | } |
37 | 35 | ||
38 | return ret; | 36 | return 0; |
39 | } | 37 | } |
40 | 38 | ||
41 | void dlm_memory_exit(void) | 39 | void dlm_memory_exit(void) |