summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 1b7fa73c943..c14b2c7ac8a 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2025,29 +2025,15 @@ out:
static int nfs4_recall_slot(struct nfs_client *clp)
{
struct nfs4_slot_table *fc_tbl;
- struct nfs4_slot *new, *old;
- int i;
+ u32 new_size;
if (!nfs4_has_session(clp))
return 0;
nfs4_begin_drain_session(clp);
- fc_tbl = &clp->cl_session->fc_slot_table;
- new = nfs4_alloc_slots(fc_tbl, fc_tbl->target_highest_slotid + 1, GFP_NOFS);
- if (!new)
- return -ENOMEM;
- spin_lock(&fc_tbl->slot_tbl_lock);
- for (i = 0; i <= fc_tbl->target_highest_slotid; i++)
- new[i].seq_nr = fc_tbl->slots[i].seq_nr;
- old = fc_tbl->slots;
- fc_tbl->slots = new;
- fc_tbl->max_slots = fc_tbl->target_highest_slotid + 1;
- fc_tbl->max_slotid = fc_tbl->target_highest_slotid;
- clp->cl_session->fc_attrs.max_reqs = fc_tbl->max_slots;
- spin_unlock(&fc_tbl->slot_tbl_lock);
-
- kfree(old);
- return 0;
+ fc_tbl = &clp->cl_session->fc_slot_table;
+ new_size = fc_tbl->server_highest_slotid + 1;
+ return nfs4_resize_slot_table(fc_tbl, new_size, 1);
}
static int nfs4_bind_conn_to_session(struct nfs_client *clp)