K 10 svn:author V 7 git2svn K 8 svn:date V 27 2021-10-19T03:37:54.576758Z K 7 svn:log V 893 nfscl: Fix a deadlock related to the NFSv4 clientID lock Without this patch, it is possible for a process doing an NFSv4 Open/create of a file to block to allow another process to acquire the exclusive lock on the clientID when holding a shared lock on the clientID. As such, both processes deadlock, with one wanting the exclusive lock, while the other holds the shared lock. This deadlock is unlikely to occur unless delegations are in use on the NFSv4 mount. This patch fixes the problem by not deferring to the process waiting for the exclusive lock when a shared lock (reference cnt) is already held by the process. This problem was detected during a recent NFSv4 interoperability testing event held by the IETF working group. (cherry picked from commit 120b20bdf49630cf2a7dbc5f93b9e985e1f4f198) Git Hash: 16f3a89d08b2deffccace6f605a9e9883cfbd4e2 Git Author: rmacklem@FreeBSD.org END