summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2021-08-21 00:02:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-21 15:53:19 +0300
commit5ea5be84ddd7bb81277598512b11f2116b566bcd (patch)
treef02bd003a6e44b1a3c5fbe433dd4be0010fb664d /include/linux
parente580323ac0b51ad10ec2e181d1f777479b7983e7 (diff)
downloadlinux-5ea5be84ddd7bb81277598512b11f2116b566bcd.tar.xz
nfs: don't atempt blocking locks on nfs reexports
[ Upstream commit f657f8eef3ff870552c9fd2839e0061046f44618 ] NFS implements blocking locks by blocking inside its lock method. In the reexport case, this blocks the nfs server thread, which could lead to deadlocks since an nfs server thread might be required to unlock the conflicting lock. It also causes a crash, since the nfs server thread assumes it can free the lock when its lm_notify lock callback is called. Ideal would be to make the nfs lock method return without blocking in this case, but for now it works just not to attempt blocking locks. The difference is just that the original client will have to poll (as it does in the v4.0 case) instead of getting a callback when the lock's available. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/exportfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index fe848901fcc3..3260fe714846 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -221,6 +221,8 @@ struct export_operations {
#define EXPORT_OP_NOATOMIC_ATTR (0x10) /* Filesystem cannot supply
atomic attribute updates
*/
+#define EXPORT_OP_SYNC_LOCKS (0x20) /* Filesystem can't do
+ asychronous blocking locks */
unsigned long flags;
};