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-2835 ptlrpc: Fix race during exp_flock_hash creation
[fs/lustre-release.git]
/
lustre
/
ldlm
/
ldlm_lockd.c
diff --git
a/lustre/ldlm/ldlm_lockd.c
b/lustre/ldlm/ldlm_lockd.c
index
2f11b93
..
1cfd813
100644
(file)
--- a/
lustre/ldlm/ldlm_lockd.c
+++ b/
lustre/ldlm/ldlm_lockd.c
@@
-2775,6
+2775,7
@@
static cfs_hash_ops_t ldlm_export_lock_ops = {
int ldlm_init_export(struct obd_export *exp)
{
int ldlm_init_export(struct obd_export *exp)
{
+ int rc;
ENTRY;
exp->exp_lock_hash =
ENTRY;
exp->exp_lock_hash =
@@
-2790,7
+2791,14
@@
int ldlm_init_export(struct obd_export *exp)
if (!exp->exp_lock_hash)
RETURN(-ENOMEM);
if (!exp->exp_lock_hash)
RETURN(-ENOMEM);
+ rc = ldlm_init_flock_export(exp);
+ if (rc)
+ GOTO(err, rc);
+
RETURN(0);
RETURN(0);
+err:
+ ldlm_destroy_export(exp);
+ RETURN(rc);
}
EXPORT_SYMBOL(ldlm_init_export);
}
EXPORT_SYMBOL(ldlm_init_export);