int rc;
unsigned long *bitmap = mds->mds_client_bitmap;
- LASSERT(bitmap);
if (!med->med_mcd)
RETURN(0);
CDEBUG(D_INFO, "freeing client at idx %u (%lld)with UUID '%s'\n",
med->med_idx, med->med_off, med->med_mcd->mcd_uuid);
+ LASSERT(bitmap);
/* Clear the bit _after_ zeroing out the client so we don't
race with mds_client_add and zero out new clients.*/
if (!test_bit(med->med_idx, bitmap)) {
int rc;
ENTRY;
-
- /* Get rid of unneeded supplementary groups */
- current->ngroups = 0;
- memset(current->groups, 0, sizeof(current->groups));
+ rc = cleanup_group_info();
+ if (rc)
+ RETURN(rc);
mds->mds_vfsmnt = mnt;
mds->mds_sb = mnt->mnt_root->d_inode->i_sb;
de = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
if (de == NULL || de->d_inode == NULL) {
CERROR("destroying non-existent object "LPU64"\n", oa->o_id);
- GOTO(out, rc = IS_ERR(de) ? PTR_ERR(de) : -ENOENT);
+ GOTO(out_dput, rc = IS_ERR(de) ? PTR_ERR(de) : -ENOENT);
}
handle = fsfilt_start(obd, mds->mds_objects_dir->d_inode,
if (err && !rc)
rc = err;
out_dput:
- l_dput(de);
-out:
+ if (de != NULL)
+ l_dput(de);
up(&parent_inode->i_sem);
pop_ctxt(&saved, &obd->obd_ctxt, NULL);
RETURN(rc);