aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-01-23 22:44:12 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-01-23 22:44:12 -0500
commit8ac092519ad91931c96d306c4bfae2c6587c325f (patch)
treece2a134fdbed539f535f1b5a63cd5bdbc264965b
parent7a308bb3016f57e5be11a677d15b821536419d36 (diff)
NFSv4.1: Fix a deadlock in layoutget
We cannot call nfs4_handle_exception() without first ensuring that the slot has been freed. If not, we end up deadlocking with the process waiting for recovery to complete, and recovery waiting for the slot table to drain. Fixes: 2e80dbe7ac51 ("NFSv4.1: Close callback races for OPEN, LAYOUTGET...") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r--fs/nfs/nfs4proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ecc151697fd4..59bb574d7d7c 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -8490,6 +8490,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
8490 goto out; 8490 goto out;
8491 } 8491 }
8492 8492
8493 nfs4_sequence_free_slot(&lgp->res.seq_res);
8493 err = nfs4_handle_exception(server, nfs4err, exception); 8494 err = nfs4_handle_exception(server, nfs4err, exception);
8494 if (!status) { 8495 if (!status) {
8495 if (exception->retry) 8496 if (exception->retry)