Whamcloud - gitweb
b=18204
authoranserper <anserper>
Thu, 28 May 2009 19:51:27 +0000 (19:51 +0000)
committeranserper <anserper>
Thu, 28 May 2009 19:51:27 +0000 (19:51 +0000)
i=Johann Lombardi
i=Oleg Drokin

do not free groups, rather put them (since they can be reused by child threads)

lustre/mdt/mdt_identity.c
lustre/mdt/mdt_lib.c

index 21cd41b..f7b1658 100644 (file)
@@ -87,7 +87,7 @@ static void mdt_identity_entry_free(struct upcall_cache *cache,
         struct md_identity *identity = &entry->u.identity;
 
         if (identity->mi_ginfo) {
-                groups_free(identity->mi_ginfo);
+                put_group_info(identity->mi_ginfo);
                 identity->mi_ginfo = NULL;
         }
 
@@ -187,7 +187,7 @@ static int mdt_identity_parse_downcall(struct upcall_cache *cache,
                 if (!perms) {
                         CERROR("failed to alloc %d permissions\n",
                                data->idd_nperms);
-                        groups_free(ginfo);
+                        put_group_info(ginfo);
                         RETURN(-ENOMEM);
                 }
 
index 973571e..7067450 100644 (file)
@@ -70,7 +70,7 @@ void mdt_exit_ucred(struct mdt_thread_info *info)
         if (uc->mu_valid != UCRED_INIT) {
                 uc->mu_suppgids[0] = uc->mu_suppgids[1] = -1;
                 if (uc->mu_ginfo) {
-                        groups_free(uc->mu_ginfo);
+                        put_group_info(uc->mu_ginfo);
                         uc->mu_ginfo = NULL;
                 }
                 if (uc->mu_identity) {
@@ -293,7 +293,7 @@ static int new_init_ucred(struct mdt_thread_info *info, ucred_init_type_t type,
 out:
         if (rc) {
                 if (ucred->mu_ginfo) {
-                        groups_free(ucred->mu_ginfo);
+                        put_group_info(ucred->mu_ginfo);
                         ucred->mu_ginfo = NULL;
                 }
                 if (ucred->mu_identity) {