Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186154
b: refs/heads/master
c: 7135840
h: refs/heads/master
v: v3
  • Loading branch information
Alexandros Batsakis authored and Trond Myklebust committed Mar 2, 2010
1 parent b989cca commit 4d077d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: dc96aef96a75348b4d1b01c4c0429ab52780683e
refs/heads/master: 7135840fc74699513d50e0c9c64922f2d38aa5e3
18 changes: 12 additions & 6 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ static void nfs41_sequence_done(struct nfs_client *clp,
clp->cl_last_renewal = timestamp;
spin_unlock(&clp->cl_lock);
/* Check sequence flags */
nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags);
if (atomic_read(&clp->cl_count) > 1)
nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags);
}
out:
/* The session may be reset by one of the error handlers. */
Expand Down Expand Up @@ -5035,7 +5036,9 @@ static void nfs41_sequence_release(void *data)
{
struct nfs_client *clp = (struct nfs_client *)data;

nfs4_schedule_state_renewal(clp);
if (atomic_read(&clp->cl_count) > 1)
nfs4_schedule_state_renewal(clp);
nfs_put_client(clp);
}

static void nfs41_sequence_call_done(struct rpc_task *task, void *data)
Expand All @@ -5046,6 +5049,8 @@ static void nfs41_sequence_call_done(struct rpc_task *task, void *data)

if (task->tk_status < 0) {
dprintk("%s ERROR %d\n", __func__, task->tk_status);
if (atomic_read(&clp->cl_count) == 1)
goto out;

if (_nfs4_async_handle_error(task, NULL, clp, NULL)
== -EAGAIN) {
Expand All @@ -5054,7 +5059,7 @@ static void nfs41_sequence_call_done(struct rpc_task *task, void *data)
}
}
dprintk("%s rpc_cred %p\n", __func__, task->tk_msg.rpc_cred);

out:
kfree(task->tk_msg.rpc_argp);
kfree(task->tk_msg.rpc_resp);

Expand Down Expand Up @@ -5092,12 +5097,13 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp,
.rpc_cred = cred,
};

if (!atomic_inc_not_zero(&clp->cl_count))
return -EIO;
args = kzalloc(sizeof(*args), GFP_KERNEL);
if (!args)
return -ENOMEM;
res = kzalloc(sizeof(*res), GFP_KERNEL);
if (!res) {
if (!args || !res) {
kfree(args);
nfs_put_client(clp);
return -ENOMEM;
}
res->sr_slotid = NFS4_MAX_SLOT_TABLE;
Expand Down

0 comments on commit 4d077d8

Please sign in to comment.