Skip to content

Commit

Permalink
dlm: fix plock notify callback to lockd
Browse files Browse the repository at this point in the history
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: David Teigland <teigland@redhat.com>
  • Loading branch information
David Teigland committed Jan 21, 2009
1 parent f3b8436 commit 24179f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/dlm/plock.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static int dlm_plock_callback(struct plock_op *op)
notify = xop->callback;

if (op->info.rv) {
notify(flc, NULL, op->info.rv);
notify(fl, NULL, op->info.rv);
goto out;
}

Expand All @@ -187,7 +187,7 @@ static int dlm_plock_callback(struct plock_op *op)
(unsigned long long)op->info.number, file, fl);
}

rv = notify(flc, NULL, 0);
rv = notify(fl, NULL, 0);
if (rv) {
/* XXX: We need to cancel the fs lock here: */
log_print("dlm_plock_callback: lock granted after lock request "
Expand Down

0 comments on commit 24179f4

Please sign in to comment.