X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdc%2Fmdc_reint.c;h=12465cd51763cd13625b3732e1b27a6c3001f207;hp=67effaf41e687d108201752fe148155f408794c7;hb=35c1f53f2403b16415cb445927c02d141eac8555;hpb=890dfb373259aeefbf0251041c8728024e52075a diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index 67effaf..12465cd 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -91,11 +91,12 @@ int mdc_resource_get_unused(struct obd_export *exp, struct lu_fid *fid, NULL, &res_id, 0, 0); if (res == NULL) RETURN(0); - + LDLM_RESOURCE_ADDREF(res); /* Initialize ibits lock policy. */ policy.l_inodebits.bits = bits; count = ldlm_cancel_resource_local(res, cancels, &policy, mode, 0, 0, NULL); + LDLM_RESOURCE_DELREF(res); ldlm_resource_putref(res); RETURN(count); }