diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-01-23 22:44:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-01 08:33:09 +0100 |
commit | 0a7023506112ea7c634dffe08683d5d90f52eec6 (patch) | |
tree | 69e3de6b2f202cb51eada56839a14d8b77bf7b57 /fs | |
parent | 73fdda3b01cd76c6570a4146bfdc6703cfce73ee (diff) | |
download | linux-rpi3-0a7023506112ea7c634dffe08683d5d90f52eec6.tar.gz linux-rpi3-0a7023506112ea7c634dffe08683d5d90f52eec6.tar.bz2 linux-rpi3-0a7023506112ea7c634dffe08683d5d90f52eec6.zip |
NFSv4.1: Fix a deadlock in layoutget
commit 8ac092519ad91931c96d306c4bfae2c6587c325f upstream.
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...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 241da19b7da4..e475a3d13f27 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -8371,6 +8371,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task, goto out; } + nfs4_sequence_free_slot(&lgp->res.seq_res); err = nfs4_handle_exception(server, nfs4err, exception); if (!status) { if (exception->retry) |