X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Flu_object.c;fp=lustre%2Fobdclass%2Flu_object.c;h=e174dfa97db535aea9896d27c697d2b423edccad;hp=dce91d5613b96d3607b7e3fade073a3303001dc9;hb=22ea9767956c89aa08ef6d80ad04aaccde647755;hpb=4b47ec5a8e68950ced4895e1ccfdf2254c016194 diff --git a/lustre/obdclass/lu_object.c b/lustre/obdclass/lu_object.c index dce91d5..e174dfa9 100644 --- a/lustre/obdclass/lu_object.c +++ b/lustre/obdclass/lu_object.c @@ -815,6 +815,13 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, ENTRY; + /* FID is from disk or network, zero FID is meaningless, return error + * early to avoid assertion in lu_object_put. If a zero FID is wanted, + * it should be allocated via lu_object_anon(). + */ + if (fid_is_zero(f)) + RETURN(ERR_PTR(-EINVAL)); + /* * This uses standard index maintenance protocol: *