Whamcloud - gitweb
b=21499 check stale object before version checks
authorMikhail Pershin <tappro@sun.com>
Mon, 1 Feb 2010 19:27:24 +0000 (11:27 -0800)
committerRobert Read <rread@sun.com>
Mon, 1 Feb 2010 19:27:24 +0000 (11:27 -0800)
i=wangdi
i=fanyong

lustre/mdt/mdt_reint.c

index 7799d54..faf5ad1 100644 (file)
@@ -108,7 +108,8 @@ int mdt_version_get_check(struct mdt_thread_info *info, int index)
                 RETURN(0);
 
         LASSERT(info->mti_mos[index]);
                 RETURN(0);
 
         LASSERT(info->mti_mos[index]);
-        LASSERT(mdt_object_exists(info->mti_mos[index]));
+        if (mdt_object_exists(info->mti_mos[index]) == 0)
+                RETURN(-ESTALE);
         mo = mdt_object_child(info->mti_mos[index]);
 
         curr_version = mo_version_get(info->mti_env, mo);
         mo = mdt_object_child(info->mti_mos[index]);
 
         curr_version = mo_version_get(info->mti_env, mo);