iops->put(env, di);
}
-static int lfsck_parent_fid(const struct lu_env *env, struct dt_object *obj,
- struct lu_fid *fid)
-{
- if (unlikely(!S_ISDIR(lfsck_object_type(obj)) ||
- !dt_try_as_dir(env, obj)))
- return -ENOTDIR;
-
- return dt_lookup(env, obj, (struct dt_rec *)fid,
- (const struct dt_key *)"..");
-}
-
/**
* Check whether needs to scan the directory or not.
*
if (rc < 0 && rc != -ENODATA)
GOTO(out, rc);
- rc = lfsck_parent_fid(env, obj, fid);
+ rc = dt_lookup_dir(env, obj, dotdot, fid);
if (depth > 0)
lfsck_object_put(env, obj);
else
stripes = lmv->lmv_stripe_count;
- OBD_ALLOC_LARGE(lslr, sizeof(*lslr) * stripes);
+ OBD_ALLOC_PTR_ARRAY_LARGE(lslr, stripes);
if (lslr == NULL) {
OBD_FREE_PTR(llmv);
struct lfsck_assistant_data *lad = com->lc_data;
struct ptlrpc_thread *mthread = &lfsck->li_thread;
struct ptlrpc_thread *athread = &lad->lad_thread;
- struct lfsck_assistant_operations *lao = lad->lad_ops;
+ const struct lfsck_assistant_operations *lao = lad->lad_ops;
struct lfsck_assistant_req *lar;
int rc = 0;
int rc1 = 0;