X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fofd%2Fofd_obd.c;h=7ce79dee2a359f2b1a13b9b03e3e3cc0ac620c28;hp=059d0e2fc01258400d6c800f91db657a9799e2cd;hb=c67aac180b7b1a0fc45060368ec166059a3c8ac0;hpb=3e2d4d2d7477dd338a87de103027d37865285e44 diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index 059d0e2..7ce79de 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -1013,6 +1013,8 @@ static int ofd_destroy_by_fid(const struct lu_env *env, fo = ofd_object_find(env, ofd, fid); if (IS_ERR(fo)) RETURN(PTR_ERR(fo)); + if (!ofd_object_exists(fo)) + GOTO(out, rc = -ENOENT); /* Tell the clients that the object is gone now and that they should * throw away any cached pages. */ @@ -1029,7 +1031,8 @@ static int ofd_destroy_by_fid(const struct lu_env *env, LASSERT(fo != NULL); rc = ofd_object_destroy(env, fo, orphan); - + EXIT; +out: ofd_object_put(env, fo); RETURN(rc); }