diff options
author | J. Bruce Fields <bfields@redhat.com> | 2021-08-21 00:02:04 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-08-26 22:32:10 +0300 |
commit | f657f8eef3ff870552c9fd2839e0061046f44618 (patch) | |
tree | 9313d3b1f40869fbba03a443df788da4799a404f /fs/nfs/export.c | |
parent | 7f024fcd5c97dc70bb9121c80407cf3cf9be7159 (diff) | |
download | linux-f657f8eef3ff870552c9fd2839e0061046f44618.tar.xz |
nfs: don't atempt blocking locks on nfs reexports
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>
Diffstat (limited to 'fs/nfs/export.c')
-rw-r--r-- | fs/nfs/export.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/export.c b/fs/nfs/export.c index 37a1a88df771..d772c20bbfd1 100644 --- a/fs/nfs/export.c +++ b/fs/nfs/export.c @@ -180,5 +180,5 @@ const struct export_operations nfs_export_ops = { .fetch_iversion = nfs_fetch_iversion, .flags = EXPORT_OP_NOWCC|EXPORT_OP_NOSUBTREECHK| EXPORT_OP_CLOSE_BEFORE_UNLINK|EXPORT_OP_REMOTE_FS| - EXPORT_OP_NOATOMIC_ATTR, + EXPORT_OP_NOATOMIC_ATTR|EXPORT_OP_SYNC_LOCKS, }; |