static struct obd_capa *osd_capa_get(const struct lu_env *env,
struct dt_object *dt,
struct lustre_capa *old,
- __u32 uid, __u64 opc)
+ __u64 opc)
{
struct osd_thread_info *info = osd_oti_get(env);
const struct lu_fid *fid = lu_object_fid(&dt->do_lu);
capa->lc_fid = *fid;
capa->lc_opc = opc;
- capa->lc_uid = uid;
+ capa->lc_uid = 0;
capa->lc_flags = dev->od_capa_alg << 24;
capa->lc_timeout = dev->od_capa_timeout;
capa->lc_expiry = 0;
if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
return -EACCES;
- fid_unpack(pack, fid);
+ result = fid_unpack(pack, fid);
+ if (result != 0)
+ return result;
+
luch = lu_object_find(env, ludev->ld_site, fid);
if (!IS_ERR(luch)) {
if (lu_object_exists(luch)) {
return info;
}
-static void osd_key_fini(const struct lu_context *ctx,
- struct lu_context_key *key, void *data)
-{
- struct osd_thread_info *info = data;
- OBD_FREE_PTR(info);
-}
+LU_KEY_FINI(osd, struct osd_thread_info);
static void osd_key_exit(const struct lu_context *ctx,
struct lu_context_key *key, void *data)