diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-05 19:32:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-05 19:32:19 -0500 |
commit | d61e612a728fb9bf848c4383f8f6645e822d5b57 (patch) | |
tree | b4024efc797fa3b992b042f484574c1d43893a61 /fs/nfs/read.c | |
parent | f26468fb9384e73fb357d2e84d3e9c88c7d1129d (diff) |
NFSv41: Clean up slot table management
We no longer need to maintain a distinction between nfs41_sequence_done and
nfs41_sequence_free_slot.
This fixes a number of slot table leakages in the NFSv4.1 code.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r-- | fs/nfs/read.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 3e04fb9ea644..d319bfbe5137 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -356,26 +356,19 @@ static void nfs_readpage_retry(struct rpc_task *task, struct nfs_read_data *data | |||
356 | struct nfs_readres *resp = &data->res; | 356 | struct nfs_readres *resp = &data->res; |
357 | 357 | ||
358 | if (resp->eof || resp->count == argp->count) | 358 | if (resp->eof || resp->count == argp->count) |
359 | goto out; | 359 | return; |
360 | 360 | ||
361 | /* This is a short read! */ | 361 | /* This is a short read! */ |
362 | nfs_inc_stats(data->inode, NFSIOS_SHORTREAD); | 362 | nfs_inc_stats(data->inode, NFSIOS_SHORTREAD); |
363 | /* Has the server at least made some progress? */ | 363 | /* Has the server at least made some progress? */ |
364 | if (resp->count == 0) | 364 | if (resp->count == 0) |
365 | goto out; | 365 | return; |
366 | 366 | ||
367 | /* Yes, so retry the read at the end of the data */ | 367 | /* Yes, so retry the read at the end of the data */ |
368 | argp->offset += resp->count; | 368 | argp->offset += resp->count; |
369 | argp->pgbase += resp->count; | 369 | argp->pgbase += resp->count; |
370 | argp->count -= resp->count; | 370 | argp->count -= resp->count; |
371 | nfs4_restart_rpc(task, NFS_SERVER(data->inode)->nfs_client, | 371 | nfs4_restart_rpc(task, NFS_SERVER(data->inode)->nfs_client); |
372 | &data->res.seq_res); | ||
373 | return; | ||
374 | out: | ||
375 | nfs4_sequence_free_slot(NFS_SERVER(data->inode)->nfs_client, | ||
376 | &data->res.seq_res); | ||
377 | return; | ||
378 | |||
379 | } | 372 | } |
380 | 373 | ||
381 | /* | 374 | /* |