Whamcloud - gitweb
(1) For remote create, only continue when lookup return ENOENT
authorfanyong <fanyong>
Tue, 21 Nov 2006 07:40:33 +0000 (07:40 +0000)
committerfanyong <fanyong>
Tue, 21 Nov 2006 07:40:33 +0000 (07:40 +0000)
(2) For mdd_lookup, do NOT return ENOENT when parent is dead obj.
    ENOENT means child does not exist.

lustre/cmm/cmm_object.c
lustre/mdd/mdd_dir.c

index fb489ba..1877680 100644 (file)
@@ -849,6 +849,8 @@ static int cmr_create(const struct lu_env *env, struct md_object *mo_p,
                         &cmm_env_info(env)->cmi_fid, NULL);
         if (rc == 0)
                 RETURN(-EEXIST);
+        else if (rc != -ENOENT)
+                RETURN(rc);
 
         /* check the SGID attr */
         cmi = cmm_env_info(env);
index 5f8662d..92d115f 100644 (file)
@@ -924,7 +924,7 @@ __mdd_lookup(const struct lu_env *env, struct md_object *pobj,
 
         mdd_lprocfs_time_start(mdo2mdd(pobj), &start, LPROC_MDD_LOOKUP);
         if (mdd_is_dead_obj(mdd_obj))
-                RETURN(-ENOENT);
+                RETURN(-ESTALE);
 
         rc = lu_object_exists(mdd2lu_obj(mdd_obj));
         if (rc == 0)