aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 46139003ea0c..8ed593766f16 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
911 kfree(string); 911 kfree(string);
912 912
913 switch (token) { 913 switch (token) {
914 case Opt_udp: 914 case Opt_xprt_udp:
915 mnt->flags &= ~NFS_MOUNT_TCP; 915 mnt->flags &= ~NFS_MOUNT_TCP;
916 mnt->nfs_server.protocol = IPPROTO_UDP; 916 mnt->nfs_server.protocol = IPPROTO_UDP;
917 mnt->timeo = 7; 917 mnt->timeo = 7;
918 mnt->retrans = 5; 918 mnt->retrans = 5;
919 break; 919 break;
920 case Opt_tcp: 920 case Opt_xprt_tcp:
921 mnt->flags |= NFS_MOUNT_TCP; 921 mnt->flags |= NFS_MOUNT_TCP;
922 mnt->nfs_server.protocol = IPPROTO_TCP; 922 mnt->nfs_server.protocol = IPPROTO_TCP;
923 mnt->timeo = 600; 923 mnt->timeo = 600;
@@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
936 kfree(string); 936 kfree(string);
937 937
938 switch (token) { 938 switch (token) {
939 case Opt_udp: 939 case Opt_xprt_udp:
940 mnt->mount_server.protocol = IPPROTO_UDP; 940 mnt->mount_server.protocol = IPPROTO_UDP;
941 break; 941 break;
942 case Opt_tcp: 942 case Opt_xprt_tcp:
943 mnt->mount_server.protocol = IPPROTO_TCP; 943 mnt->mount_server.protocol = IPPROTO_TCP;
944 break; 944 break;
945 default: 945 default:
@@ -1153,20 +1153,20 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
1153 c = strchr(dev_name, ':'); 1153 c = strchr(dev_name, ':');
1154 if (c == NULL) 1154 if (c == NULL)
1155 return -EINVAL; 1155 return -EINVAL;
1156 len = c - dev_name - 1; 1156 len = c - dev_name;
1157 if (len > sizeof(data->hostname)) 1157 if (len > sizeof(data->hostname))
1158 return -EINVAL; 1158 return -ENAMETOOLONG;
1159 strncpy(data->hostname, dev_name, len); 1159 strncpy(data->hostname, dev_name, len);
1160 args.nfs_server.hostname = data->hostname; 1160 args.nfs_server.hostname = data->hostname;
1161 1161
1162 c++; 1162 c++;
1163 if (strlen(c) > NFS_MAXPATHLEN) 1163 if (strlen(c) > NFS_MAXPATHLEN)
1164 return -EINVAL; 1164 return -ENAMETOOLONG;
1165 args.nfs_server.export_path = c; 1165 args.nfs_server.export_path = c;
1166 1166
1167 status = nfs_try_mount(&args, mntfh); 1167 status = nfs_try_mount(&args, mntfh);
1168 if (status) 1168 if (status)
1169 return -EINVAL; 1169 return status;
1170 1170
1171 /* 1171 /*
1172 * Translate to nfs_mount_data, which nfs_fill_super 1172 * Translate to nfs_mount_data, which nfs_fill_super
@@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
1677 /* while calculating len, pretend ':' is '\0' */ 1677 /* while calculating len, pretend ':' is '\0' */
1678 len = c - dev_name; 1678 len = c - dev_name;
1679 if (len > NFS4_MAXNAMLEN) 1679 if (len > NFS4_MAXNAMLEN)
1680 return -EINVAL; 1680 return -ENAMETOOLONG;
1681 *hostname = kzalloc(len, GFP_KERNEL); 1681 *hostname = kzalloc(len, GFP_KERNEL);
1682 if (*hostname == NULL) 1682 if (*hostname == NULL)
1683 return -ENOMEM; 1683 return -ENOMEM;
@@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
1686 c++; /* step over the ':' */ 1686 c++; /* step over the ':' */
1687 len = strlen(c); 1687 len = strlen(c);
1688 if (len > NFS4_MAXPATHLEN) 1688 if (len > NFS4_MAXPATHLEN)
1689 return -EINVAL; 1689 return -ENAMETOOLONG;
1690 *mntpath = kzalloc(len + 1, GFP_KERNEL); 1690 *mntpath = kzalloc(len + 1, GFP_KERNEL);
1691 if (*mntpath == NULL) 1691 if (*mntpath == NULL)
1692 return -ENOMEM; 1692 return -ENOMEM;