Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=23216 a fix for a possible memory leak in lov_setup
[fs/lustre-release.git]
/
lustre
/
lov
/
lovsub_object.c
diff --git
a/lustre/lov/lovsub_object.c
b/lustre/lov/lovsub_object.c
index
e8097e1
..
a0b5da3
100644
(file)
--- a/
lustre/lov/lovsub_object.c
+++ b/
lustre/lov/lovsub_object.c
@@
-26,7
+26,7
@@
* GPL HEADER END
*/
/*
* 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.
*/
/*
* Use is subject to license terms.
*/
/*
@@
-42,7
+42,9
@@
#include "lov_cl_internal.h"
#include "lov_cl_internal.h"
-/** \addtogroup lov lov @{ */
+/** \addtogroup lov
+ * @{
+ */
/*****************************************************************************
*
/*****************************************************************************
*
@@
-83,7
+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);
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;
lov->u.raid0.lo_sub[los->lso_index] = NULL;
+ cfs_spin_unlock(&lov->u.raid0.lo_sub_lock);
}
lu_object_fini(obj);
}
lu_object_fini(obj);
@@
-97,7
+101,7
@@
static int lovsub_object_print(const struct lu_env *env, void *cookie,
{
struct lovsub_object *los = lu2lovsub(obj);
{
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,
}
static int lovsub_attr_set(const struct lu_env *env, struct cl_object *obj,