Trond Myklebust dfe1fe75e0 NFSv4: Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode()
If the inode is being evicted, but has to return a delegation first,
then it can cause a deadlock in the corner case where the server reboots
before the delegreturn completes, but while the call to iget5_locked() in
nfs4_opendata_get_inode() is waiting for the inode free to complete.
Since the open call still holds a session slot, the reboot recovery
cannot proceed.

In order to break the logjam, we can turn the delegation return into a
privileged operation for the case where we're evicting the inode. We
know that in that case, there can be no other state recovery operation
that conflicts.

Reported-by: zhangxiaoxu (A) <zhangxiaoxu5@huawei.com>
Fixes: 5fcdfacc01f3 ("NFSv4: Return delegations synchronously in evict_inode")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2021-06-03 10:14:42 -04:00
..
2021-02-26 15:49:51 -07:00
2021-05-07 11:23:41 -07:00
2020-08-15 08:26:55 -07:00
2020-05-27 10:10:12 -04:00
2021-05-07 11:23:41 -07:00
2021-05-07 11:23:41 -07:00
2021-05-07 11:23:41 -07:00
2021-04-05 09:04:20 -04:00
2021-01-24 14:27:20 +01:00
2021-05-07 11:23:41 -07:00
2021-05-07 11:23:41 -07:00
2020-12-17 12:15:03 -08:00