]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.7.10/nlm-ensure-that-we-resend-all-pending-blocking-locks-after-a-reclaim.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.7.10 / nlm-ensure-that-we-resend-all-pending-blocking-locks-after-a-reclaim.patch
1 From 666b3d803a511fbc9bc5e5ea8ce66010cf03ea13 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <Trond.Myklebust@netapp.com>
3 Date: Tue, 19 Feb 2013 12:04:42 -0500
4 Subject: NLM: Ensure that we resend all pending blocking locks after a reclaim
5
6 From: Trond Myklebust <Trond.Myklebust@netapp.com>
7
8 commit 666b3d803a511fbc9bc5e5ea8ce66010cf03ea13 upstream.
9
10 Currently, nlmclnt_lock will break out of the for(;;) loop when
11 the reclaimer wakes up the blocking lock thread by setting
12 nlm_lck_denied_grace_period. This causes the lock request to fail
13 with an ENOLCK error.
14 The intention was always to ensure that we resend the lock request
15 after the grace period has expired.
16
17 Reported-by: Wangyuan Zhang <Wangyuan.Zhang@netapp.com>
18 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 fs/lockd/clntproc.c | 3 +++
23 1 file changed, 3 insertions(+)
24
25 --- a/fs/lockd/clntproc.c
26 +++ b/fs/lockd/clntproc.c
27 @@ -551,6 +551,9 @@ again:
28 status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
29 if (status < 0)
30 break;
31 + /* Resend the blocking lock request after a server reboot */
32 + if (resp->status == nlm_lck_denied_grace_period)
33 + continue;
34 if (resp->status != nlm_lck_blocked)
35 break;
36 }