X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flov%2Flovsub_object.c;h=536039d5e6d7a961ef61c7c80ffa60dd840c4123;hb=7136981bfaad8b95e15e9d2969b94c933491eb98;hp=a0b5da35bba7e12e6475d004203681363f8f3da9;hpb=48d29ff71de18d8d375b072a7287ba9ecdb6cdce;p=fs%2Flustre-release.git diff --git a/lustre/lov/lovsub_object.c b/lustre/lov/lovsub_object.c index a0b5da3..536039d 100644 --- a/lustre/lov/lovsub_object.c +++ b/lustre/lov/lovsub_object.c @@ -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. @@ -28,6 +26,8 @@ /* * 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/ @@ -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; @@ -85,9 +86,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);