dlm: fix plock notify callback to lockd
authorDavid Teigland <teigland@redhat.com>
Mon, 19 Jan 2009 19:13:33 +0000 (13:13 -0600)
committerDavid Teigland <teigland@redhat.com>
Wed, 21 Jan 2009 21:28:45 +0000 (15:28 -0600)
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>
fs/dlm/plock.c

index eba87ff3177b6070284ee3eea402fd34c610c657..502b1ea5ef6bdfcf77b01aa092a5f93ac4559a37 100644 (file)
@@ -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;
        }
 
@@ -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 "