From: yury Date: Fri, 17 Nov 2006 17:28:42 +0000 (+0000) Subject: - in lmv_placement_policy() add missed lmv_object_put() X-Git-Tag: v1_8_0_110~486^2~140 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1b8a6606898dbacb6bceb146e32c75cde0e69e62;p=fs%2Flustre-release.git - in lmv_placement_policy() add missed lmv_object_put() --- diff --git a/lustre/cmm/mdc_object.c b/lustre/cmm/mdc_object.c index 9121f80..888ee34 100644 --- a/lustre/cmm/mdc_object.c +++ b/lustre/cmm/mdc_object.c @@ -225,7 +225,6 @@ static int mdc_attr_get(const struct lu_env *env, struct md_object *mo, RETURN(rc); } - static int mdc_object_create(const struct lu_env *env, struct md_object *mo, const struct md_op_spec *spec, diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 091a80b..a82b6ce 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -764,6 +764,17 @@ static int lmv_placement_policy(struct obd_device *obd, struct lu_fid *rpid; int mea_idx; + /* + * If we have this flag turned on, this means that + * caller did not notice yet that dir is split. And if + * see that it is split in fact - this is race, let + * caller know. + */ + if (op_data->op_bias & MDS_CHECK_SPLIT) { + lmv_obj_put(obj); + RETURN(-ERESTART); + } + /* * If the dir got split, alloc fid according to its * hash. No matter what we create, object create should @@ -774,16 +785,6 @@ static int lmv_placement_policy(struct obd_device *obd, rpid = &obj->lo_inodes[mea_idx].li_fid; *mds = obj->lo_inodes[mea_idx].li_mds; lmv_obj_put(obj); - - /* - * If we have this flag turned on, this means that - * caller did not notice yet that dir is split. And if - * see that it is split in fact - this is race, let - * caller know. - */ - if (op_data->op_bias & MDS_CHECK_SPLIT) - RETURN(-ERESTART); - rc = 0; CDEBUG(D_INODE, "The obj "DFID" has been split, got MDS at "