Whamcloud - gitweb
LU-2744 build: fix 'data race condition' issues
[fs/lustre-release.git] / lustre / lov / lovsub_object.c
index 3527bd1..66130ea 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -66,6 +66,7 @@ int lovsub_object_init(const struct lu_env *env, struct lu_object *obj,
         below = under->ld_ops->ldo_object_alloc(env, obj->lo_header, under);
         if (below != NULL) {
                 lu_object_add(obj, below);
+               cl_object_page_init(lu2cl(obj), sizeof(struct lovsub_page));
                 result = 0;
         } else
                 result = -ENOMEM;
@@ -150,7 +151,7 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env,
         struct lu_object     *obj;
 
         ENTRY;
-        OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, CFS_ALLOC_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, __GFP_IO);
         if (los != NULL) {
                 struct cl_object_header *hdr;