Merge branches 'clk-typo', 'clk-json-schema', 'clk-mtk-2712-eco' and 'clk-rockchip...
[linux-2.6-block.git] / fs / nfs / nfs4renewd.c
index 1f8c2ae43a8dfb871b84f6cc7104655283d95ac3..6ea431b067dd6f7df986c1ca6277be85d58e2612 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: