NFSv4.1: Fix a deadlock in layoutget
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 24 Jan 2017 03:44:12 +0000 (22:44 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 24 Jan 2017 03:44:12 +0000 (22:44 -0500)
commit8ac092519ad91931c96d306c4bfae2c6587c325f
treece2a134fdbed539f535f1b5a63cd5bdbc264965b
parent7a308bb3016f57e5be11a677d15b821536419d36
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>
fs/nfs/nfs4proc.c