NFSv4: Protect the state recovery thread against direct reclaim
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 29 Jan 2022 18:32:45 +0000 (13:32 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 25 Feb 2022 23:50:12 +0000 (18:50 -0500)
commit3e17898aca293a24dae757a440a50aa63ca29671
treeb1dfbeab0f379693af02ccd21e2fcbe9e6a590af
parentab22e2cbbccbcf65bed9524605ac5dacb89471e8
NFSv4: Protect the state recovery thread against direct reclaim

If memory allocation triggers a direct reclaim from the state recovery
thread, then we can deadlock. Use memalloc_nofs_save/restore to ensure
that doesn't happen.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4state.c