]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: David Teigland <teigland@redhat.com> |
2 | commit 24179f488092267c9a033d7e25ce7a58af50ff79 | |
3 | Author: David Teigland <teigland@redhat.com> | |
4 | Date: Mon Jan 19 13:13:33 2009 -0600 | |
5 | Subject: dlm: fix plock notify callback to lockd | |
6 | ||
7 | We should use the original copy of the file_lock, fl, instead | |
8 | of the copy, flc in the lockd notify callback. The range in flc has | |
9 | been modified by posix_lock_file(), so it will not match a copy of the | |
10 | lock in lockd. | |
11 | ||
12 | Signed-off-by: David Teigland <teigland@redhat.com> | |
13 | Signed-off-by: Coly Li <coly.li@suse.de> | |
14 | ||
15 | diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c | |
16 | index eba87ff..502b1ea 100644 | |
17 | --- a/fs/dlm/plock.c | |
18 | +++ b/fs/dlm/plock.c | |
19 | @@ -168,7 +168,7 @@ static int dlm_plock_callback(struct plock_op *op) | |
20 | notify = xop->callback; | |
21 | ||
22 | if (op->info.rv) { | |
23 | - notify(flc, NULL, op->info.rv); | |
24 | + notify(fl, NULL, op->info.rv); | |
25 | goto out; | |
26 | } | |
27 | ||
28 | @@ -187,7 +187,7 @@ static int dlm_plock_callback(struct plock_op *op) | |
29 | (unsigned long long)op->info.number, file, fl); | |
30 | } | |
31 | ||
32 | - rv = notify(flc, NULL, 0); | |
33 | + rv = notify(fl, NULL, 0); | |
34 | if (rv) { | |
35 | /* XXX: We need to cancel the fs lock here: */ | |
36 | log_print("dlm_plock_callback: lock granted after lock request " |