summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-02-19 18:04:42 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-02-19 18:18:27 +0100
commit666b3d803a511fbc9bc5e5ea8ce66010cf03ea13 (patch)
treec8aca4461673f4e2a294be8bf913ff1af64c8e8b /fs/lockd
parentumount oops when remove blocklayoutdriver first (diff)
downloadlinux-666b3d803a511fbc9bc5e5ea8ce66010cf03ea13.tar.xz
linux-666b3d803a511fbc9bc5e5ea8ce66010cf03ea13.zip
NLM: Ensure that we resend all pending blocking locks after a reclaim
Currently, nlmclnt_lock will break out of the for(;;) loop when the reclaimer wakes up the blocking lock thread by setting nlm_lck_denied_grace_period. This causes the lock request to fail with an ENOLCK error. The intention was always to ensure that we resend the lock request after the grace period has expired. Reported-by: Wangyuan Zhang <Wangyuan.Zhang@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/clntproc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 54f9e6ce0430..52e5120bb159 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -550,6 +550,9 @@ again:
status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
if (status < 0)
break;
+ /* Resend the blocking lock request after a server reboot */
+ if (resp->status == nlm_lck_denied_grace_period)
+ continue;
if (resp->status != nlm_lck_blocked)
break;
}