X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_handler.c;h=e11d46bb6985938c0738d13c1f7a42739c5a651c;hp=a88a8724216481aeb2caa7898a3965d0e45950bd;hb=6125dec0a2b07822ef8149ff49c02d95df997668;hpb=8421d161cc0f76ca4d635b8f9e6ebb1b5e7b9b47 diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index a88a872..e11d46b 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -686,6 +686,10 @@ static int mdt_getattr_internal(struct mdt_thread_info *info, if (mdt_object_remote(o)) { /* This object is located on remote node.*/ + /* Return -EIO for old client */ + if (!mdt_is_dne_client(req->rq_export)) + GOTO(out, rc = -EIO); + repbody->fid1 = *mdt_object_fid(o); repbody->valid = OBD_MD_FLID | OBD_MD_MDS; GOTO(out, rc = 0); @@ -5518,12 +5522,12 @@ static int mdt_fid2path(const struct lu_env *env, struct mdt_device *mdt, RETURN(-EINVAL); } - rc = lu_object_exists(&obj->mot_obj.mo_lu); - if (rc <= 0) { - if (rc == -1) - rc = -EREMOTE; - else - rc = -ENOENT; + if (mdt_object_remote(obj)) + rc = -EREMOTE; + else if (!mdt_object_exists(obj)) + rc = -ENOENT; + + if (rc < 0) { mdt_object_put(env, obj); CDEBUG(D_IOCTL, "nonlocal object "DFID": %d\n", PFID(&fp->gf_fid), rc);