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
LU-4659 mdd: rename forgets updating target linkea
[fs/lustre-release.git]
/
lustre
/
mdd
/
mdd_orphans.c
diff --git
a/lustre/mdd/mdd_orphans.c
b/lustre/mdd/mdd_orphans.c
index
38e9849
..
6e6b39f
100644
(file)
--- a/
lustre/mdd/mdd_orphans.c
+++ b/
lustre/mdd/mdd_orphans.c
@@
-27,7
+27,7
@@
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 201
2
, Intel Corporation.
+ * Copyright (c) 2011, 201
3
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-156,7
+156,7
@@
static inline void mdd_orphan_ref_del(const struct lu_env *env,
int orph_declare_index_insert(const struct lu_env *env,
struct mdd_object *obj,
int orph_declare_index_insert(const struct lu_env *env,
struct mdd_object *obj,
-
cfs_
umode_t mode, struct thandle *th)
+ umode_t mode, struct thandle *th)
{
struct mdd_device *mdd = mdo2mdd(&obj->mod_obj);
struct dt_key *key;
{
struct mdd_device *mdd = mdo2mdd(&obj->mod_obj);
struct dt_key *key;
@@
-215,7
+215,7
@@
static int orph_index_insert(const struct lu_env *env,
mdo_ref_add(env, obj, th);
if (!S_ISDIR(mdd_object_type(obj)))
mdo_ref_add(env, obj, th);
if (!S_ISDIR(mdd_object_type(obj)))
-
goto out
;
+
GOTO(out, rc = 0)
;
mdo_ref_add(env, obj, th);
mdd_orphan_ref_add(env, mdd, th);
mdo_ref_add(env, obj, th);
mdd_orphan_ref_add(env, mdd, th);
@@
-223,7
+223,7
@@
static int orph_index_insert(const struct lu_env *env,
/* try best to fixup directory, dont return errors
* from here */
if (!dt_try_as_dir(env, next))
/* try best to fixup directory, dont return errors
* from here */
if (!dt_try_as_dir(env, next))
-
goto out
;
+
GOTO(out, rc = 0)
;
next->do_index_ops->dio_delete(env, next,
(const struct dt_key *)dotdot,
th, BYPASS_CAPA);
next->do_index_ops->dio_delete(env, next,
(const struct dt_key *)dotdot,
th, BYPASS_CAPA);
@@
-326,11
+326,12
@@
static int orphan_object_destroy(const struct lu_env *env,
int rc = 0;
ENTRY;
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);
rc = orph_declare_index_delete(env, obj, th);
if (rc)
GOTO(stop, rc);