Skip to content

Commit 82c7d82

Browse files
andypriceteigland
authored andcommitted
dlm: config: Fix ENOMEM failures in make_cluster()
Commit 1ae1602 "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>
1 parent f55532a commit 82c7d82

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/dlm/config.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,12 @@ static struct config_group *make_cluster(struct config_group *g,
343343
struct dlm_cluster *cl = NULL;
344344
struct dlm_spaces *sps = NULL;
345345
struct dlm_comms *cms = NULL;
346-
void *gps = NULL;
347346

348347
cl = kzalloc(sizeof(struct dlm_cluster), GFP_NOFS);
349348
sps = kzalloc(sizeof(struct dlm_spaces), GFP_NOFS);
350349
cms = kzalloc(sizeof(struct dlm_comms), GFP_NOFS);
351350

352-
if (!cl || !gps || !sps || !cms)
351+
if (!cl || !sps || !cms)
353352
goto fail;
354353

355354
config_group_init_type_name(&cl->group, name, &cluster_type);

0 commit comments

Comments
 (0)