Commit f06d65a1 authored by Vitaly Fertman's avatar Vitaly Fertman Committed by Greg Kroah-Hartman

staging: lustre: ldlm: reconstruct proper flags on enqueue resend

otherwise, waiting lock may get granted as no BLOCKED_GRANTED
flag is returned
Signed-off-by: default avatarVitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1944
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5496
Reviewed-on: http://review.whamcloud.com/11644Reviewed-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e9792be1
...@@ -470,8 +470,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) ...@@ -470,8 +470,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
if (flags & LDLM_FL_FAILED) if (flags & LDLM_FL_FAILED)
goto granted; goto granted;
if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | if (!(flags & LDLM_FL_BLOCKED_MASK)) {
LDLM_FL_BLOCK_CONV))) {
if (!data) if (!data)
/* mds granted the lock in the reply */ /* mds granted the lock in the reply */
goto granted; goto granted;
......
...@@ -1549,8 +1549,7 @@ enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *ns, ...@@ -1549,8 +1549,7 @@ enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *ns,
* before we got a chance to actually enqueue it. We don't * before we got a chance to actually enqueue it. We don't
* need to do anything else. * need to do anything else.
*/ */
*flags &= ~(LDLM_FL_BLOCK_GRANTED | *flags &= ~LDLM_FL_BLOCKED_MASK;
LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_WAIT);
goto out; goto out;
} }
......
...@@ -177,8 +177,7 @@ int ldlm_completion_ast_async(struct ldlm_lock *lock, __u64 flags, void *data) ...@@ -177,8 +177,7 @@ int ldlm_completion_ast_async(struct ldlm_lock *lock, __u64 flags, void *data)
return 0; return 0;
} }
if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | if (!(flags & LDLM_FL_BLOCKED_MASK)) {
LDLM_FL_BLOCK_CONV))) {
wake_up(&lock->l_waitq); wake_up(&lock->l_waitq);
return ldlm_completion_tail(lock); return ldlm_completion_tail(lock);
} }
...@@ -224,8 +223,7 @@ int ldlm_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data) ...@@ -224,8 +223,7 @@ int ldlm_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
goto noreproc; goto noreproc;
} }
if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED | if (!(flags & LDLM_FL_BLOCKED_MASK)) {
LDLM_FL_BLOCK_CONV))) {
wake_up(&lock->l_waitq); wake_up(&lock->l_waitq);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment