X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fdt_object.c;h=afe90d365c758fe5c197065585e68c77ff1c2348;hp=deb5863c6b72eac23e22650a914425eaa2ac0b60;hb=8931d9070415e808e09bb4befd7cd38ef2431149;hpb=74f4d7b3f173674af8d05ab445f0bb11b557c20e diff --git a/lustre/obdclass/dt_object.c b/lustre/obdclass/dt_object.c index deb5863..afe90d3 100644 --- a/lustre/obdclass/dt_object.c +++ b/lustre/obdclass/dt_object.c @@ -215,22 +215,25 @@ EXPORT_SYMBOL(dt_lookup_dir); /* this differs from dt_locate by top_dev as parameter * but not one from lu_site */ struct dt_object *dt_locate_at(const struct lu_env *env, - struct dt_device *dev, const struct lu_fid *fid, - struct lu_device *top_dev) + struct dt_device *dev, + const struct lu_fid *fid, + struct lu_device *top_dev, + const struct lu_object_conf *conf) { - struct lu_object *lo, *n; - ENTRY; + struct lu_object *lo; + struct lu_object *n; - lo = lu_object_find_at(env, top_dev, fid, NULL); + lo = lu_object_find_at(env, top_dev, fid, conf); if (IS_ERR(lo)) - return (void *)lo; + return ERR_PTR(PTR_ERR(lo)); LASSERT(lo != NULL); - cfs_list_for_each_entry(n, &lo->lo_header->loh_layers, lo_linkage) { + list_for_each_entry(n, &lo->lo_header->loh_layers, lo_linkage) { if (n->lo_dev == &dev->dd_lu_dev) return container_of0(n, struct dt_object, do_lu); } + return ERR_PTR(-ENOENT); } EXPORT_SYMBOL(dt_locate_at);