From: Andy Adamson Date: Fri, 4 Dec 2009 20:55:30 +0000 (-0500) Subject: nfs41: free the slot on unhandled read errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=36bbe34239f63377b5179ad32fd13cd71d6e1ba7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git nfs41: free the slot on unhandled read errors 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 Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6ef50aa785d5..f0b6d569a50a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -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; }