Whamcloud - gitweb
LU-3449 tests: Trash track_declares_assert related errors
[fs/lustre-release.git] / lustre / mdd / mdd_orphans.c
index 38e9849..a1064f8 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -326,11 +326,12 @@ static int orphan_object_destroy(const struct lu_env *env,
         int rc = 0;
         ENTRY;
 
-        th = mdd_trans_create(env, mdd);
-        if (IS_ERR(th)) {
-                CERROR("Cannot get thandle\n");
-                RETURN(-ENOMEM);
-        }
+       th = mdd_trans_create(env, mdd);
+       if (IS_ERR(th)) {
+               CERROR("Cannot get thandle\n");
+               RETURN(PTR_ERR(th));
+       }
+
         rc = orph_declare_index_delete(env, obj, th);
         if (rc)
                 GOTO(stop, rc);