diff options
author | Olga Kornievskaia <olga.kornievskaia@gmail.com> | 2019-12-16 16:34:02 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-01-24 16:51:13 -0500 |
commit | b24ee6c64ca785739b3ef8d95fd6becaad1bde39 (patch) | |
tree | 67f9ee7b75d21ad8bc6ffbce2a440af61eebda40 /fs/nfs/fs_context.c | |
parent | f7b37b8b139860ed786bf8ce4358290c6053d94d (diff) | |
download | linux-b24ee6c64ca785739b3ef8d95fd6becaad1bde39.tar.bz2 |
NFS: allow deprecation of NFS UDP protocol
Add a kernel config CONFIG_NFS_DISABLE_UDP_SUPPORT to disallow NFS
UDP mounts and enable it by default.
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/fs_context.c')
-rw-r--r-- | fs/nfs/fs_context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c index 0247dcb7b316..dfd95847f005 100644 --- a/fs/nfs/fs_context.c +++ b/fs/nfs/fs_context.c @@ -1215,6 +1215,10 @@ static int nfs_fs_context_validate(struct fs_context *fc) } } else { nfs_set_mount_transport_protocol(ctx); +#ifdef CONFIG_NFS_DISABLE_UDP_SUPPORT + if (ctx->nfs_server.protocol == XPRT_TRANSPORT_UDP) + goto out_invalid_transport_udp; +#endif if (ctx->nfs_server.protocol == XPRT_TRANSPORT_RDMA) port = NFS_RDMA_PORT; } |