hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/fs/nfs/nfs4session.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * fs/nfs/nfs4session.c
34 *
....@@ -55,7 +56,7 @@
5556
5657 /**
5758 * nfs4_slot_tbl_drain_complete - wake waiters when drain is complete
58
- * @tbl - controlling slot table
59
+ * @tbl: controlling slot table
5960 *
6061 */
6162 void nfs4_slot_tbl_drain_complete(struct nfs4_slot_table *tbl)
....@@ -110,6 +111,8 @@
110111 slot->table = tbl;
111112 slot->slot_nr = slotid;
112113 slot->seq_nr = seq_init;
114
+ slot->seq_nr_highest_sent = seq_init;
115
+ slot->seq_nr_last_acked = seq_init - 1;
113116 }
114117 return slot;
115118 }
....@@ -276,7 +279,8 @@
276279 p = &tbl->slots;
277280 while (*p) {
278281 (*p)->seq_nr = ivalue;
279
- (*p)->interrupted = 0;
282
+ (*p)->seq_nr_highest_sent = ivalue;
283
+ (*p)->seq_nr_last_acked = ivalue - 1;
280284 p = &(*p)->next;
281285 }
282286 tbl->highest_used_slotid = NFS4_NO_SLOT;
....@@ -573,12 +577,11 @@
573577 void nfs4_destroy_session(struct nfs4_session *session)
574578 {
575579 struct rpc_xprt *xprt;
576
- struct rpc_cred *cred;
580
+ const struct cred *cred;
577581
578582 cred = nfs4_get_clid_cred(session->clp);
579583 nfs4_proc_destroy_session(session, cred);
580
- if (cred)
581
- put_rpccred(cred);
584
+ put_cred(cred);
582585
583586 rcu_read_lock();
584587 xprt = rcu_dereference(session->clp->cl_rpcclient->cl_xprt);