Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-microblaze.git] / fs / nfs / nfs4renewd.c
index 82e7719..6ea431b 100644 (file)
@@ -57,7 +57,7 @@ nfs4_renew_state(struct work_struct *work)
        const struct nfs4_state_maintenance_ops *ops;
        struct nfs_client *clp =
                container_of(work, struct nfs_client, cl_renewd.work);
-       struct rpc_cred *cred;
+       const struct cred *cred;
        long lease;
        unsigned long last, now;
        unsigned renew_flags = 0;
@@ -68,7 +68,6 @@ nfs4_renew_state(struct work_struct *work)
        if (test_bit(NFS_CS_STOP_RENEW, &clp->cl_res_state))
                goto out;
 
-       spin_lock(&clp->cl_lock);
        lease = clp->cl_lease_time;
        last = clp->cl_last_renewal;
        now = jiffies;
@@ -79,8 +78,7 @@ nfs4_renew_state(struct work_struct *work)
                renew_flags |= NFS4_RENEW_DELEGATION_CB;
 
        if (renew_flags != 0) {
-               cred = ops->get_state_renewal_cred_locked(clp);
-               spin_unlock(&clp->cl_lock);
+               cred = ops->get_state_renewal_cred(clp);
                if (cred == NULL) {
                        if (!(renew_flags & NFS4_RENEW_DELEGATION_CB)) {
                                set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
@@ -92,7 +90,7 @@ nfs4_renew_state(struct work_struct *work)
 
                        /* Queue an asynchronous RENEW. */
                        ret = ops->sched_state_renewal(clp, cred, renew_flags);
-                       put_rpccred(cred);
+                       put_cred(cred);
                        switch (ret) {
                        default:
                                goto out_exp;
@@ -104,7 +102,6 @@ nfs4_renew_state(struct work_struct *work)
        } else {
                dprintk("%s: failed to call renewd. Reason: lease not expired \n",
                                __func__);
-               spin_unlock(&clp->cl_lock);
        }
        nfs4_schedule_state_renewal(clp);
 out_exp:
@@ -153,7 +150,7 @@ void nfs4_set_lease_period(struct nfs_client *clp,
        spin_unlock(&clp->cl_lock);
 
        /* Cap maximum reconnect timeout at 1/2 lease period */
-       rpc_cap_max_reconnect_timeout(clp->cl_rpcclient, lease >> 1);
+       rpc_set_connect_timeout(clp->cl_rpcclient, lease, lease >> 1);
 }
 
 /*