X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmds%2Fmds_fs.c;h=7979092115bd7be9e3b5442cfa659e07ff2d5448;hb=016929cd3acbf3c315ea56c96ce75b8efe00f4c0;hp=d3e235a9b358b6af3389def2ed34a08ba90f8565;hpb=ff17cc7e0282d9b1522810e0c5d12171c4d46a2d;p=fs%2Flustre-release.git diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c index d3e235a..7979092 100644 --- a/lustre/mds/mds_fs.c +++ b/lustre/mds/mds_fs.c @@ -127,7 +127,6 @@ int mds_client_free(struct obd_export *exp, int clear_client) int rc; unsigned long *bitmap = mds->mds_client_bitmap; - LASSERT(bitmap); if (!med->med_mcd) RETURN(0); @@ -138,6 +137,7 @@ int mds_client_free(struct obd_export *exp, int clear_client) 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)) { @@ -370,10 +370,9 @@ int mds_fs_setup(struct obd_device *obd, struct vfsmount *mnt) 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; @@ -643,7 +642,7 @@ int mds_obd_destroy(struct obd_export *exp, struct obdo *oa, 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, @@ -661,8 +660,8 @@ int mds_obd_destroy(struct obd_export *exp, struct obdo *oa, 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);