Skip to content

Commit

Permalink
nfs41: free the slot on unhandled read errors
Browse files Browse the repository at this point in the history
nfs4_read_done returns zero on unhandled errors. nfs_readpage_result will
return on a negative tk_status without freeing the slot.
Call nfs4_sequence_free_slot on unhandled errors in nfs4_read_done.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed Dec 4, 2009
1 parent e608e79 commit 36bbe34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3009,6 +3009,9 @@ static int nfs4_read_done(struct rpc_task *task, struct nfs_read_data *data)
nfs_invalidate_atime(data->inode);
if (task->tk_status > 0)
renew_lease(server, data->timestamp);
else if (task->tk_status < 0)
nfs4_sequence_free_slot(server->nfs_client, &data->res.seq_res);

return 0;
}

Expand Down

0 comments on commit 36bbe34

Please sign in to comment.