nfsroot: set tcp as the default transport protocol
authorLiwei Song <liwei.song@windriver.com>
Wed, 25 Mar 2020 03:50:13 +0000 (11:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:38:10 +0000 (10:38 +0200)
[ Upstream commit 89c8023fd46167a41246a56b31d1b3c9a20b6970 ]

UDP is disabled by default in commit b24ee6c64ca7 ("NFS: allow
deprecation of NFS UDP protocol"), but the default mount options
is still udp, change it to tcp to avoid the "Unsupported transport
protocol udp" error if no protocol is specified when mount nfs.

Fixes: b24ee6c64ca7 ("NFS: allow deprecation of NFS UDP protocol")
Signed-off-by: Liwei Song <liwei.song@windriver.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfsroot.c

index effaa4247b912fe9836e65910470e1e0ec15a0f2..8d32788056022d71f030d1d90dff7c4c09ff9447 100644 (file)
@@ -88,7 +88,7 @@
 #define NFS_ROOT               "/tftpboot/%s"
 
 /* Default NFSROOT mount options. */
-#define NFS_DEF_OPTIONS                "vers=2,udp,rsize=4096,wsize=4096"
+#define NFS_DEF_OPTIONS                "vers=2,tcp,rsize=4096,wsize=4096"
 
 /* Parameters passed from the kernel command line */
 static char nfs_root_parms[NFS_MAXPATHLEN + 1] __initdata = "";