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-8514 mdd: transaction failure should be checked
[fs/lustre-release.git]
/
lustre
/
mdd
/
mdd_trans.c
diff --git
a/lustre/mdd/mdd_trans.c
b/lustre/mdd/mdd_trans.c
index
b5b32f6
..
23b40d4
100644
(file)
--- a/
lustre/mdd/mdd_trans.c
+++ b/
lustre/mdd/mdd_trans.c
@@
-63,6
+63,12
@@
int mdd_trans_start(const struct lu_env *env, struct mdd_device *mdd,
int mdd_trans_stop(const struct lu_env *env, struct mdd_device *mdd,
int result, struct thandle *handle)
{
int mdd_trans_stop(const struct lu_env *env, struct mdd_device *mdd,
int result, struct thandle *handle)
{
+ int rc;
+
handle->th_result = result;
handle->th_result = result;
- return mdd_child_ops(mdd)->dt_trans_stop(env, mdd->mdd_child, handle);
+ rc = mdd_child_ops(mdd)->dt_trans_stop(env, mdd->mdd_child, handle);
+
+ /* if operation failed, return \a result, otherwise return status of
+ * dt_trans_stop */
+ return result ?: rc;
}
}