hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/nfs/nfs4renewd.c
....@@ -57,7 +57,7 @@
5757 const struct nfs4_state_maintenance_ops *ops;
5858 struct nfs_client *clp =
5959 container_of(work, struct nfs_client, cl_renewd.work);
60
- struct rpc_cred *cred;
60
+ const struct cred *cred;
6161 long lease;
6262 unsigned long last, now;
6363 unsigned renew_flags = 0;
....@@ -68,7 +68,6 @@
6868 if (test_bit(NFS_CS_STOP_RENEW, &clp->cl_res_state))
6969 goto out;
7070
71
- spin_lock(&clp->cl_lock);
7271 lease = clp->cl_lease_time;
7372 last = clp->cl_last_renewal;
7473 now = jiffies;
....@@ -79,8 +78,7 @@
7978 renew_flags |= NFS4_RENEW_DELEGATION_CB;
8079
8180 if (renew_flags != 0) {
82
- cred = ops->get_state_renewal_cred_locked(clp);
83
- spin_unlock(&clp->cl_lock);
81
+ cred = ops->get_state_renewal_cred(clp);
8482 if (cred == NULL) {
8583 if (!(renew_flags & NFS4_RENEW_DELEGATION_CB)) {
8684 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
....@@ -92,7 +90,7 @@
9290
9391 /* Queue an asynchronous RENEW. */
9492 ret = ops->sched_state_renewal(clp, cred, renew_flags);
95
- put_rpccred(cred);
93
+ put_cred(cred);
9694 switch (ret) {
9795 default:
9896 goto out_exp;
....@@ -104,7 +102,6 @@
104102 } else {
105103 dprintk("%s: failed to call renewd. Reason: lease not expired \n",
106104 __func__);
107
- spin_unlock(&clp->cl_lock);
108105 }
109106 nfs4_schedule_state_renewal(clp);
110107 out_exp:
....@@ -141,15 +138,12 @@
141138 *
142139 * @clp: pointer to nfs_client
143140 * @lease: new value for lease period
144
- * @lastrenewed: time at which lease was last renewed
145141 */
146142 void nfs4_set_lease_period(struct nfs_client *clp,
147
- unsigned long lease,
148
- unsigned long lastrenewed)
143
+ unsigned long lease)
149144 {
150145 spin_lock(&clp->cl_lock);
151146 clp->cl_lease_time = lease;
152
- clp->cl_last_renewal = lastrenewed;
153147 spin_unlock(&clp->cl_lock);
154148
155149 /* Cap maximum reconnect timeout at 1/2 lease period */