Whamcloud - gitweb
LU-1445 ofd: set index during server_data_init
[fs/lustre-release.git] / lustre / lov / lovsub_object.c
index d1057f3..3527bd1 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * GPL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -85,9 +85,9 @@ static void lovsub_object_free(const struct lu_env *env, struct lu_object *obj)
         if (lov) {
                 LASSERT(lov->lo_type == LLT_RAID0);
                 LASSERT(lov->u.raid0.lo_sub[los->lso_index] == los);
-                cfs_spin_lock(&lov->u.raid0.lo_sub_lock);
-                lov->u.raid0.lo_sub[los->lso_index] = NULL;
-                cfs_spin_unlock(&lov->u.raid0.lo_sub_lock);
+               spin_lock(&lov->u.raid0.lo_sub_lock);
+               lov->u.raid0.lo_sub[los->lso_index] = NULL;
+               spin_unlock(&lov->u.raid0.lo_sub_lock);
         }
 
         lu_object_fini(obj);
@@ -101,7 +101,7 @@ static int lovsub_object_print(const struct lu_env *env, void *cookie,
 {
         struct lovsub_object *los = lu2lovsub(obj);
 
-        return (*p)(env, cookie, "[%i]", los->lso_index);
+        return (*p)(env, cookie, "[%d]", los->lso_index);
 }
 
 static int lovsub_attr_set(const struct lu_env *env, struct cl_object *obj,