From: David Teigland <teigland@redhat.com> Date: Wed, 18 Feb 2009 10:19:12 -0600 Subject: [dlm] fix plock notify callback to lockd Message-id: 20090218161912.GA3175@redhat.com O-Subject: [RHEL5.4 PATCH] dlm: fix plock notify callback to lockd Bugzilla: 470074 bz 470074 - overlapping nfs locks don't work in gfs/dlm brew build including this patch https://brewweb.devel.redhat.com/taskinfo?taskID=1655257 upstream commit: >From 6b08506431338618d266c9bf2c979cbbccbc6191 Mon Sep 17 00:00:00 2001 >From: David Teigland <teigland@redhat.com> >Date: Wed, 18 Feb 2009 09:54:03 -0600 >Subject: [PATCH] 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: David Teigland <teigland@redhat.com> diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index c31a4dc..e929c1b 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -169,7 +169,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; } @@ -188,7 +188,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 "