]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
dlm: config: Fix ENOMEM failures in make_cluster()
authorAndrew Price <anprice@redhat.com>
Tue, 22 Mar 2016 17:36:34 +0000 (17:36 +0000)
committerDavid Teigland <teigland@redhat.com>
Tue, 29 Mar 2016 15:28:08 +0000 (10:28 -0500)
Commit 1ae1602de0 "configfs: switch ->default groups to a linked list"
left the NULL gps pointer behind after removing the kcalloc() call which
made it non-NULL. It also left the !gps check in place so make_cluster()
now fails with ENOMEM. Remove the remaining uses of the gps variable to
fix that.

Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/config.c

index 519112168a9e203f048f821357a3de784f682b8d..1669f6291c95b58e9bedbecc9a4d6bfb2f1b00e3 100644 (file)
@@ -343,13 +343,12 @@ static struct config_group *make_cluster(struct config_group *g,
        struct dlm_cluster *cl = NULL;
        struct dlm_spaces *sps = NULL;
        struct dlm_comms *cms = NULL;
-       void *gps = NULL;
 
        cl = kzalloc(sizeof(struct dlm_cluster), GFP_NOFS);
        sps = kzalloc(sizeof(struct dlm_spaces), GFP_NOFS);
        cms = kzalloc(sizeof(struct dlm_comms), GFP_NOFS);
 
-       if (!cl || !gps || !sps || !cms)
+       if (!cl || !sps || !cms)
                goto fail;
 
        config_group_init_type_name(&cl->group, name, &cluster_type);