nfs4: fix units bug causing hang on recovery
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 14 Dec 2010 00:05:46 +0000 (19:05 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 21 Dec 2010 16:51:24 +0000 (11:51 -0500)
Note that cl_lease_time is in jiffies.  This can cause a very long wait
in the NFS4ERR_CLID_INUSE case.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 4435e5e1f904e3e5ba26f4eb578fc30c5f6d997b..494c68739ff46f8c7a677ab84a1f5651f84ce75d 100644 (file)
@@ -3517,7 +3517,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program,
                if (signalled())
                        break;
                if (loop++ & 1)
-                       ssleep(clp->cl_lease_time + 1);
+                       ssleep(clp->cl_lease_time / HZ + 1);
                else
                        if (++clp->cl_id_uniquifier == 0)
                                break;