Whamcloud - gitweb
Land b_head_quota onto HEAD (20081116_0105)
[fs/lustre-release.git] / lustre / mdd / mdd_permission.c
index 80e5e83..efbc52a 100644 (file)
@@ -386,7 +386,7 @@ int mdd_capa_get(const struct lu_env *env, struct md_object *obj,
                           capa->lc_opc);
         if (IS_ERR(oc)) {
                 rc = PTR_ERR(oc);
-        } else {
+        } else if (likely(oc != NULL)) {
                 capa_cpy(capa, oc);
                 capa_put(oc);
         }