Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206380
b: refs/heads/master
c: d185a33
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 22, 2010
1 parent e983c99 commit d5b5e07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a6e26cdb8f17b1075c2dfd8f2f3c341bac4f441
refs/heads/master: d185a334c748b3ca9de1f3a293fd8a9cf68378ab
26 changes: 12 additions & 14 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,11 @@ static void nfs41_check_drain_session_complete(struct nfs4_session *ses)
complete(&ses->complete);
}

static void nfs41_sequence_free_slot(const struct nfs_client *clp,
struct nfs4_sequence_res *res)
static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)
{
struct nfs4_slot_table *tbl;

tbl = &clp->cl_session->fc_slot_table;
tbl = &res->sr_session->fc_slot_table;
if (res->sr_slotid == NFS4_MAX_SLOT_TABLE) {
/* just wake up the next guy waiting since
* we may have not consumed a slot after all */
Expand All @@ -385,14 +384,12 @@ static void nfs41_sequence_free_slot(const struct nfs_client *clp,

spin_lock(&tbl->slot_tbl_lock);
nfs4_free_slot(tbl, res->sr_slotid);
nfs41_check_drain_session_complete(clp->cl_session);
nfs41_check_drain_session_complete(res->sr_session);
spin_unlock(&tbl->slot_tbl_lock);
res->sr_slotid = NFS4_MAX_SLOT_TABLE;
}

static void nfs41_sequence_done(struct nfs_client *clp,
struct nfs4_sequence_res *res,
int rpc_status)
static void nfs41_sequence_done(struct nfs4_sequence_res *res)
{
unsigned long timestamp;
struct nfs4_slot_table *tbl;
Expand All @@ -413,7 +410,8 @@ static void nfs41_sequence_done(struct nfs_client *clp,

/* Check the SEQUENCE operation status */
if (res->sr_status == 0) {
tbl = &clp->cl_session->fc_slot_table;
struct nfs_client *clp = res->sr_session->clp;
tbl = &res->sr_session->fc_slot_table;
slot = tbl->slots + res->sr_slotid;
/* Update the slot's sequence and clientid lease timer */
++slot->seq_nr;
Expand All @@ -429,7 +427,7 @@ static void nfs41_sequence_done(struct nfs_client *clp,
out:
/* The session may be reset by one of the error handlers. */
dprintk("%s: Error %d free the slot \n", __func__, res->sr_status);
nfs41_sequence_free_slot(clp, res);
nfs41_sequence_free_slot(res);
}

/*
Expand Down Expand Up @@ -582,7 +580,7 @@ static void nfs41_call_sync_done(struct rpc_task *task, void *calldata)
{
struct nfs41_call_sync_data *data = calldata;

nfs41_sequence_done(data->clp, data->seq_res, task->tk_status);
nfs41_sequence_done(data->seq_res);
}

struct rpc_call_ops nfs41_call_sync_ops = {
Expand Down Expand Up @@ -662,7 +660,7 @@ static void nfs4_sequence_done(const struct nfs_server *server,
{
#ifdef CONFIG_NFS_V4_1
if (nfs4_has_session(server->nfs_client))
nfs41_sequence_done(server->nfs_client, res, rpc_status);
nfs41_sequence_done(res);
#endif /* CONFIG_NFS_V4_1 */
}

Expand Down Expand Up @@ -4606,7 +4604,7 @@ static void nfs4_get_lease_time_done(struct rpc_task *task, void *calldata)
(struct nfs4_get_lease_time_data *)calldata;

dprintk("--> %s\n", __func__);
nfs41_sequence_done(data->clp, &data->res->lr_seq_res, task->tk_status);
nfs41_sequence_done(&data->res->lr_seq_res);
switch (task->tk_status) {
case -NFS4ERR_DELAY:
case -NFS4ERR_GRACE:
Expand Down Expand Up @@ -5095,7 +5093,7 @@ static void nfs41_sequence_call_done(struct rpc_task *task, void *data)
struct nfs4_sequence_data *calldata = data;
struct nfs_client *clp = calldata->clp;

nfs41_sequence_done(clp, task->tk_msg.rpc_resp, task->tk_status);
nfs41_sequence_done(task->tk_msg.rpc_resp);

if (task->tk_status < 0) {
dprintk("%s ERROR %d\n", __func__, task->tk_status);
Expand Down Expand Up @@ -5184,7 +5182,7 @@ static void nfs4_reclaim_complete_done(struct rpc_task *task, void *data)
struct nfs4_sequence_res *res = &calldata->res.seq_res;

dprintk("--> %s\n", __func__);
nfs41_sequence_done(clp, res, task->tk_status);
nfs41_sequence_done(res);
switch (task->tk_status) {
case 0:
case -NFS4ERR_COMPLETE_ALREADY:
Expand Down

0 comments on commit d5b5e07

Please sign in to comment.