Commit 24179f48 authored by David Teigland's avatar David Teigland

dlm: fix plock notify callback to lockd

We should use the original copy of the file_lock, fl, instead
of the copy, flc in the lockd notify callback.  The range in flc has
been modified by posix_lock_file(), so it will not match a copy of the
lock in lockd.
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent f3b8436a
...@@ -168,7 +168,7 @@ static int dlm_plock_callback(struct plock_op *op) ...@@ -168,7 +168,7 @@ static int dlm_plock_callback(struct plock_op *op)
notify = xop->callback; notify = xop->callback;
if (op->info.rv) { if (op->info.rv) {
notify(flc, NULL, op->info.rv); notify(fl, NULL, op->info.rv);
goto out; goto out;
} }
...@@ -187,7 +187,7 @@ static int dlm_plock_callback(struct plock_op *op) ...@@ -187,7 +187,7 @@ static int dlm_plock_callback(struct plock_op *op)
(unsigned long long)op->info.number, file, fl); (unsigned long long)op->info.number, file, fl);
} }
rv = notify(flc, NULL, 0); rv = notify(fl, NULL, 0);
if (rv) { if (rv) {
/* XXX: We need to cancel the fs lock here: */ /* XXX: We need to cancel the fs lock here: */
log_print("dlm_plock_callback: lock granted after lock request " log_print("dlm_plock_callback: lock granted after lock request "
......
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